UNPKG

@fellow/prosemirror-recreate-transform

Version:

Create a set of steps transforming one prosemirror json document to another

10 lines (7 loc) 232 B
import { Transform } from "prosemirror-transform"; import { Node } from "prosemirror-model"; export function removeMarks(doc: Node) { const tr = new Transform(doc); tr.removeMark(0, doc.nodeSize - 2); return tr.doc; }