mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 02:50:58 +08:00
🚨
This commit is contained in:
parent
a7dadc5a1f
commit
01e5df1e3d
@ -48,7 +48,6 @@ import {activeBlur, renderTextMenu, showKeyboardToolbarUtil} from "../../mobile/
|
||||
import {hideTooltip} from "../../dialog/tooltip";
|
||||
import {appearanceMenu} from "../toolbar/Font";
|
||||
import {setPosition} from "../../util/setPosition";
|
||||
import {avRender} from "../render/av/render";
|
||||
import {emitOpenMenu} from "../../plugin/EventBus";
|
||||
import {insertAttrViewBlockAnimation} from "../render/av/row";
|
||||
import {avContextmenu, duplicateCompletely} from "../render/av/action";
|
||||
|
@ -406,4 +406,4 @@ const openEdit = (protyle: IProtyle, element:HTMLElement, event: MouseEvent) =>
|
||||
}
|
||||
target = target.parentElement;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -613,7 +613,7 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar
|
||||
} else {
|
||||
// li 下面为 hr、嵌入块、数学公式、iframe、音频、视频、图表渲染块等时递归处理
|
||||
if (element.classList.contains("li")) {
|
||||
return focusBlock(element.querySelector('[data-node-id]'), parentElement, toStart);
|
||||
return focusBlock(element.querySelector("[data-node-id]"), parentElement, toStart);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -1336,9 +1336,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
const isMatchList = matchHotKey(window.siyuan.config.keymap.editor.insert.list.custom, event)
|
||||
const isMatchCheck = matchHotKey(window.siyuan.config.keymap.editor.insert.check.custom, event)
|
||||
const isMatchOList = matchHotKey(window.siyuan.config.keymap.editor.insert["ordered-list"].custom, event)
|
||||
const isMatchList = matchHotKey(window.siyuan.config.keymap.editor.insert.list.custom, event);
|
||||
const isMatchCheck = matchHotKey(window.siyuan.config.keymap.editor.insert.check.custom, event);
|
||||
const isMatchOList = matchHotKey(window.siyuan.config.keymap.editor.insert["ordered-list"].custom, event);
|
||||
if (isMatchList || isMatchOList || isMatchCheck) {
|
||||
const selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
|
||||
if (selectsElement.length === 0) {
|
||||
@ -1346,8 +1346,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
protyle.hint.lastIndex = -1;
|
||||
protyle.hint.fill((isMatchCheck ? "* [ ] " : (isMatchList ? "* " : "1. ")) + Lute.Caret, protyle);
|
||||
} else if (selectsElement.length === 1) {
|
||||
const subType = selectsElement[0].dataset.subtype
|
||||
const type = selectsElement[0].dataset.type
|
||||
const subType = selectsElement[0].dataset.subtype;
|
||||
const type = selectsElement[0].dataset.type;
|
||||
if (type === "NodeParagraph") {
|
||||
turnsIntoOneTransaction({
|
||||
protyle,
|
||||
@ -1355,7 +1355,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||
type: isMatchCheck ? "Blocks2TLs" : (isMatchList ? "Blocks2ULs" : "Blocks2OLs")
|
||||
});
|
||||
} else if (type === "NodeList") {
|
||||
const id = selectsElement[0].dataset.nodeId
|
||||
const id = selectsElement[0].dataset.nodeId;
|
||||
if (subType === "o" && (isMatchList || isMatchCheck)) {
|
||||
turnsOneInto({
|
||||
protyle,
|
||||
|
@ -1116,7 +1116,7 @@ export const turnsOneInto = async (options: {
|
||||
processRender(options.protyle.wysiwyg.element);
|
||||
highlightRender(options.protyle.wysiwyg.element);
|
||||
avRender(options.protyle.wysiwyg.element, options.protyle);
|
||||
}
|
||||
};
|
||||
|
||||
const updateRef = (protyle: IProtyle, id: string, index = 0) => {
|
||||
if (index > 6) {
|
||||
|
Loading…
Reference in New Issue
Block a user