mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-02 02:40:15 +01:00
This commit is contained in:
parent
81f39961eb
commit
ec29bc7071
4 changed files with 21 additions and 30 deletions
|
|
@ -6,7 +6,7 @@ import {zoomOut} from "../../menus/protyle";
|
|||
import {processRender} from "../../protyle/util/processCode";
|
||||
import {highlightRender} from "../../protyle/render/highlightRender";
|
||||
import {blockRender} from "../../protyle/render/blockRender";
|
||||
import {disabledForeverProtyle, disabledProtyle, enableProtyle} from "../../protyle/util/onGet";
|
||||
import {disabledForeverProtyle, setReadonlyByConfig} from "../../protyle/util/onGet";
|
||||
import {setStorageVal} from "../../protyle/util/compatibility";
|
||||
import {closePanel} from "./closePanel";
|
||||
import {showMessage} from "../../dialog/message";
|
||||
|
|
@ -92,18 +92,7 @@ const focusStack = (backStack: IBackStack) => {
|
|||
if (getResponse.data.isSyncing) {
|
||||
disabledForeverProtyle(protyle);
|
||||
} else {
|
||||
let readOnly = window.siyuan.config.readonly ? "true" : "false";
|
||||
if (readOnly === "false") {
|
||||
readOnly = window.siyuan.config.editor.readOnly ? "true" : "false";
|
||||
if (readOnly === "false") {
|
||||
readOnly = protyle.wysiwyg.element.getAttribute(Constants.CUSTOM_SY_READONLY);
|
||||
}
|
||||
}
|
||||
if (readOnly === "true") {
|
||||
disabledProtyle(protyle);
|
||||
} else {
|
||||
enableProtyle(protyle);
|
||||
}
|
||||
setReadonlyByConfig(protyle);
|
||||
}
|
||||
protyle.contentElement.scrollTop = backStack.scrollTop;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue