export const ol = {
  content: "list_item+",
  managed: {attributes: ["start"]},
  group: "block",
  attrs: {order: {default: 1}},
  parseDOM: [{tag: "ol", getAttrs: el => ({order: el.hasAttribute("start") ? Number(el.start) : 1})}],
  toDOM: node => node.attrs.order === 1 ? ["ol", 0] : ["ol", {start: node.attrs.order}, 0]
};

/* -------------------------------------------- */

export const ul = {
  content: "list_item+",
  group: "block",
  parseDOM: [{tag: "ul"}],
  toDOM: () => ["ul", 0]
};

/* -------------------------------------------- */

export const li = {
  content: "paragraph block*",
  defining: true,
  parseDOM: [{tag: "li"}],
  toDOM: () => ["li", 0]
};
