mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-07 09:18:49 +01:00
This commit is contained in:
parent
053c4864a1
commit
4b542c9ff2
2 changed files with 11 additions and 9 deletions
|
|
@ -335,14 +335,6 @@ export class Breadcrumb {
|
|||
accelerator: window.siyuan.config.keymap.editor.general.wysiwyg.custom,
|
||||
click: () => {
|
||||
setEditMode(protyle, "wysiwyg");
|
||||
protyle.scroll.lastScrollTop = 0;
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: protyle.block.rootID,
|
||||
size: window.siyuan.config.editor.dynamicLoadBlocks,
|
||||
}, getResponse => {
|
||||
onGet(getResponse, protyle);
|
||||
window.siyuan.menus.menu.remove();
|
||||
});
|
||||
}
|
||||
}];
|
||||
editSubmenu.push({
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {
|
|||
protyle.scroll?.element.classList.add("fn__none");
|
||||
if (protyle.options.render.breadcrumb) {
|
||||
protyle.breadcrumb?.element.classList.add("fn__none");
|
||||
if (protyle.block.showAll) {
|
||||
const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]')
|
||||
exitFocusElement.classList.add("fn__none");
|
||||
exitFocusElement.nextElementSibling.classList.add("fn__none");
|
||||
}
|
||||
}
|
||||
protyle.preview.render(protyle);
|
||||
} else if (type === "wysiwyg") {
|
||||
|
|
@ -26,7 +31,12 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {
|
|||
}
|
||||
if (protyle.options.render.breadcrumb) {
|
||||
protyle.breadcrumb?.element.classList.remove("fn__none");
|
||||
if (protyle.block.showAll) {
|
||||
const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]')
|
||||
exitFocusElement.classList.remove("fn__none");
|
||||
exitFocusElement.nextElementSibling.classList.remove("fn__none");
|
||||
}
|
||||
}
|
||||
}
|
||||
hideElements( ["gutter", "toolbar", "select", "hint", "util"], protyle);
|
||||
hideElements(["gutter", "toolbar", "select", "hint", "util"], protyle);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue