From 9fa331b407e2762c9dd39e886ca3af7c0d1e2fe0 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 18 Aug 2023 09:44:26 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/8960 --- app/src/protyle/wysiwyg/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 3aa17cd31..87239e20f 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1266,7 +1266,11 @@ export class WYSIWYG { } protyle.toolbar.range = getEditorRange(protyle.element); if (target.tagName === "SPAN") { // https://ld246.com/article/1665141518103 - const types = protyle.toolbar.getCurrentType(protyle.toolbar.range); + let types = protyle.toolbar.getCurrentType(protyle.toolbar.range); + if (types.length === 0) { + // https://github.com/siyuan-note/siyuan/issues/8960 + types = (target.dataset.type || "").split(" "); + } if (types.length > 0) { removeSearchMark(target); }