fix: check for storedMarks in getMarkAttributes, fix #2039

This commit is contained in:
Philipp Kühn 2021-10-14 20:45:40 +02:00
parent 60944ce9ce
commit 22c82ba61f

View File

@ -8,6 +8,10 @@ export default function getMarkAttributes(state: EditorState, typeOrName: string
const marks: Mark[] = []
if (empty) {
if (state.storedMarks) {
marks.push(...state.storedMarks)
}
marks.push(...state.selection.$head.marks())
} else {
state.doc.nodesBetween(from, to, node => {