This commit is contained in:
parent
70d0246668
commit
4d32146dca
1 changed files with 3 additions and 6 deletions
|
@ -1311,12 +1311,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
// toolbar action
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.insert.lastUsed.custom, event)) {
|
||||
protyle.toolbar.range = range;
|
||||
let selectElements: Element[] = [];
|
||||
if (selectText === "" && protyle.toolbar.getCurrentType(range).length === 0) {
|
||||
selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
|
||||
if (selectElements.length === 0) {
|
||||
selectElements = [nodeElement];
|
||||
}
|
||||
const selectElements: Element[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
|
||||
if (selectText === "" && selectElements.length === 0) {
|
||||
selectElements.push(nodeElement);
|
||||
}
|
||||
fontEvent(protyle, selectElements);
|
||||
event.stopPropagation();
|
||||
|
|
Loading…
Add table
Reference in a new issue