Vanessa 2022-10-11 23:38:14 +08:00
parent 41a7c5d63f
commit c56c69e0e0
18 changed files with 121 additions and 39 deletions

View file

@ -47,7 +47,7 @@ export class Editor extends Model {
scrollAttr: options.scrollAttr,
typewriterMode: true,
after: (editor) => {
if (window.siyuan.config.readonly) {
if (window.siyuan.config.readonly || window.siyuan.config.editor.readOnly) {
disabledProtyle(editor.protyle);
}

View file

@ -33,6 +33,9 @@ export const rename = (options: {
type: "notebook" | "file"
range?: Range,
}) => {
if (window.siyuan.config.editor.readOnly) {
return;
}
const dialog = new Dialog({
title: window.siyuan.languages.rename,
content: `<div class="b3-dialog__content"><input class="b3-text-field fn__block" value=""></div>