mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
This commit is contained in:
parent
80f0ecb156
commit
5e6efbce4f
1 changed files with 9 additions and 1 deletions
|
|
@ -24,7 +24,8 @@ export const editor = {
|
||||||
fetchPost("/api/setting/setEditor", window.siyuan.config.editor, () => {
|
fetchPost("/api/setting/setEditor", window.siyuan.config.editor, () => {
|
||||||
const allModels = getAllModels()
|
const allModels = getAllModels()
|
||||||
allModels.editor.forEach(editor => {
|
allModels.editor.forEach(editor => {
|
||||||
if (readOnly) { disabledProtyle(editor.editor.protyle);
|
if (readOnly) {
|
||||||
|
disabledProtyle(editor.editor.protyle);
|
||||||
} else {
|
} else {
|
||||||
enableProtyle(editor.editor.protyle);
|
enableProtyle(editor.editor.protyle);
|
||||||
}
|
}
|
||||||
|
|
@ -38,6 +39,13 @@ export const editor = {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
allModels.search.forEach(search => {
|
||||||
|
if (readOnly) {
|
||||||
|
disabledProtyle(search.protyle.protyle);
|
||||||
|
} else {
|
||||||
|
enableProtyle(search.protyle.protyle);
|
||||||
|
}
|
||||||
|
});
|
||||||
window.siyuan.blockPanels.forEach(item => {
|
window.siyuan.blockPanels.forEach(item => {
|
||||||
item.editors.forEach(editor => {
|
item.editors.forEach(editor => {
|
||||||
if (readOnly) {
|
if (readOnly) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue