Vanessa 2023-04-18 11:57:19 +08:00
parent b87510558c
commit 4ccee1a4d8
5 changed files with 43 additions and 15 deletions

View file

@ -115,7 +115,7 @@ export const initFramework = () => {
editIconElement.setAttribute("xlink:href", "#iconEdit");
}
editElement.addEventListener(getEventName(), () => {
window.siyuan.config.editor.readOnly = editIconElement.getAttribute("xlink:href") === "#iconEdit";
window.siyuan.config.editor.readOnly = !window.siyuan.config.editor.readOnly;
fetchPost("/api/setting/setEditor", window.siyuan.config.editor);
});
document.getElementById("toolbarSync").addEventListener(getEventName(), () => {