mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-09 22:22:34 +01:00
This commit is contained in:
parent
73e2ce44e9
commit
c6d2d629e8
16 changed files with 98 additions and 78 deletions
|
|
@ -18,7 +18,12 @@ import {ipcRenderer, shell} from "electron";
|
|||
import {pushBack} from "../util/backForward";
|
||||
import {Asset} from "../asset";
|
||||
import {Layout} from "../layout";
|
||||
import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName,} from "../protyle/util/hasClosest";
|
||||
import {
|
||||
hasClosestBlock,
|
||||
hasClosestByAttribute,
|
||||
hasClosestByClassName,
|
||||
isInEmbedBlock,
|
||||
} from "../protyle/util/hasClosest";
|
||||
import {zoomOut} from "../menus/protyle";
|
||||
import {countBlockWord, countSelectWord} from "../layout/status";
|
||||
import {showMessage} from "../dialog/message";
|
||||
|
|
@ -349,7 +354,7 @@ const switchEditor = (editor: Editor, options: IOpenFileOptions, allModels: IMod
|
|||
}
|
||||
let nodeElement: Element;
|
||||
Array.from(editor.editor.protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${options.id}"]`)).find(item => {
|
||||
if (!hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed")) {
|
||||
if (!isInEmbedBlock(item)) {
|
||||
nodeElement = item;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue