fix: check for storedMarks in getMarkAttributes, fix #2039
This commit is contained in:
@@ -8,6 +8,10 @@ export default function getMarkAttributes(state: EditorState, typeOrName: string
|
|||||||
const marks: Mark[] = []
|
const marks: Mark[] = []
|
||||||
|
|
||||||
if (empty) {
|
if (empty) {
|
||||||
|
if (state.storedMarks) {
|
||||||
|
marks.push(...state.storedMarks)
|
||||||
|
}
|
||||||
|
|
||||||
marks.push(...state.selection.$head.marks())
|
marks.push(...state.selection.$head.marks())
|
||||||
} else {
|
} else {
|
||||||
state.doc.nodesBetween(from, to, node => {
|
state.doc.nodesBetween(from, to, node => {
|
||||||
|
|||||||
Reference in New Issue
Block a user