|
@@ -11,11 +11,7 @@ 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.breadcrumb.toggleExit(true);
|
|
|
}
|
|
|
protyle.preview.render(protyle);
|
|
|
} else if (type === "wysiwyg") {
|
|
@@ -31,11 +27,7 @@ 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");
|
|
|
- }
|
|
|
+ protyle.breadcrumb.toggleExit(!protyle.block.showAll);
|
|
|
}
|
|
|
}
|
|
|
hideElements(["gutter", "toolbar", "select", "hint", "util"], protyle);
|