mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 19:30:16 +01:00
This commit is contained in:
parent
41a7c5d63f
commit
c56c69e0e0
18 changed files with 121 additions and 39 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue