mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-13 07:56:14 +01:00
🎨 Improve tab insertion with Tab key (#17169)
This commit is contained in:
parent
f7efba8436
commit
ae11fee5c5
1 changed files with 1 additions and 1 deletions
|
|
@ -1884,7 +1884,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
return;
|
||||
}
|
||||
if (!event.shiftKey) {
|
||||
document.execCommand("insertText", false, window.siyuan.config.editor.codeTabSpaces === 0 ? "\t" : "".padStart(window.siyuan.config.editor.codeTabSpaces, " "));
|
||||
document.execCommand("insertHTML", false, window.siyuan.config.editor.codeTabSpaces === 0 ? "\t" : "".padStart(window.siyuan.config.editor.codeTabSpaces, " "));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue