mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 09:25:29 +08:00
fix: check for storedMarks in getMarkAttributes, fix #2039
This commit is contained in:
parent
60944ce9ce
commit
22c82ba61f
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user