UNPKG
@fellow/prosemirror-recreate-transform
Version:
latest (1.2.3)
1.2.3
1.2.2
1.2.1
Create a set of steps transforming one prosemirror json document to another
@fellow/prosemirror-recreate-transform
/
src
/
removeMarks.ts
10 lines
(7 loc)
•
232 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
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
; }