import { findWrapping, ReplaceAroundStep, canSplit, liftTarget, canJoin } from 'prosemirror-transform'; import { NodeRange, Fragment, Slice } from 'prosemirror-model'; import { Selection } from 'prosemirror-state'; const olDOM = ["ol", 0], ulDOM = ["ul", 0], liDOM = ["li", 0]; /** An ordered list [node spec](https://prosemirror.net/docs/ref/#model.NodeSpec). Has a single attribute, `order`, which determines the number at which the list starts counting, and defaults to 1. Represented as an `
    ` element. */ const orderedList = { attrs: { order: { default: 1 } }, parseDOM: [{ tag: "ol", getAttrs(dom) { return { order: dom.hasAttribute("start") ? +dom.getAttribute("start") : 1 }; } }], toDOM(node) { return node.attrs.order == 1 ? olDOM : ["ol", { start: node.attrs.order }, 0]; } }; /** A bullet list node spec, represented in the DOM as `