mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 17:43:49 +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[] = []
|
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 => {
|
||||||
|
Loading…
Reference in New Issue
Block a user