From 22c82ba61fe14db19e1049dfcf9bef0b7abb796d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 14 Oct 2021 20:45:40 +0200 Subject: [PATCH] fix: check for storedMarks in getMarkAttributes, fix #2039 --- packages/core/src/helpers/getMarkAttributes.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/src/helpers/getMarkAttributes.ts b/packages/core/src/helpers/getMarkAttributes.ts index 744de316..b9ff8bb0 100644 --- a/packages/core/src/helpers/getMarkAttributes.ts +++ b/packages/core/src/helpers/getMarkAttributes.ts @@ -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 => {