Vanessa 2025-10-04 22:12:23 +08:00
parent fe28779608
commit 6f9901e95f

View file

@ -245,9 +245,10 @@ const setHTML = (options: {
protyle.breadcrumb.element.nextElementSibling.textContent = "";
}
protyle.element.removeAttribute("disabled-forever");
setReadonlyByConfig(protyle, updateReadonly);
if (options.action.includes(Constants.CB_GET_OPENNEW) && window.siyuan.config.editor.readOnly) {
updateReadonlyMethod(protyle.breadcrumb.element.parentElement.querySelector('.block__icon[data-type="readonly"]'), protyle);
if (options.action.includes(Constants.CB_GET_OPENNEW) && window.siyuan.config.editor.readOnly && !window.siyuan.config.readonly) {
enableProtyle(protyle);
} else {
setReadonlyByConfig(protyle, updateReadonly);
}
}