mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
4b809fbefa
commit
380cee6e10
1 changed files with 1 additions and 0 deletions
|
|
@ -90,6 +90,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
|
||||||
if (!isPreview && (lineNumber === "true" || (lineNumber !== "false" && window.siyuan.config.editor.codeSyntaxHighlightLineNum))) {
|
if (!isPreview && (lineNumber === "true" || (lineNumber !== "false" && window.siyuan.config.editor.codeSyntaxHighlightLineNum))) {
|
||||||
// 需要先添加 class 以防止抖动 https://ld246.com/article/1648116585443
|
// 需要先添加 class 以防止抖动 https://ld246.com/article/1648116585443
|
||||||
block.firstElementChild.classList.add("protyle-linenumber__rows");
|
block.firstElementChild.classList.add("protyle-linenumber__rows");
|
||||||
|
block.firstElementChild.setAttribute("contenteditable", "false");
|
||||||
lineNumberRender(block);
|
lineNumberRender(block);
|
||||||
} else {
|
} else {
|
||||||
block.firstElementChild.classList.remove("protyle-linenumber__rows");
|
block.firstElementChild.classList.remove("protyle-linenumber__rows");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue