mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 19:30:16 +01:00
This commit is contained in:
parent
0254a46fef
commit
86f326d393
2 changed files with 17 additions and 1 deletions
|
|
@ -326,6 +326,9 @@ export const disabledProtyle = (protyle: IProtyle) => {
|
|||
protyle.wysiwyg.element.querySelectorAll('[contenteditable="true"][spellcheck]').forEach(item => {
|
||||
item.setAttribute("contenteditable", "false");
|
||||
});
|
||||
protyle.wysiwyg.element.querySelectorAll('.protyle-action[draggable="true"]').forEach(item => {
|
||||
item.setAttribute("draggable", "false");
|
||||
});
|
||||
if (protyle.breadcrumb) {
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"] use').setAttribute("xlink:href", "#iconLock");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"]').setAttribute("aria-label", window.siyuan.config.editor.readOnly ? window.siyuan.languages.tempUnlock : window.siyuan.languages.unlockEdit);
|
||||
|
|
@ -360,6 +363,9 @@ export const enableProtyle = (protyle: IProtyle) => {
|
|||
item.setAttribute("contenteditable", "true");
|
||||
}
|
||||
});
|
||||
protyle.wysiwyg.element.querySelectorAll('.protyle-action[draggable="false"]').forEach(item => {
|
||||
item.setAttribute("draggable", "true");
|
||||
});
|
||||
if (protyle.breadcrumb) {
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"] use').setAttribute("xlink:href", "#iconUnlock");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"]').setAttribute("aria-label", window.siyuan.config.editor.readOnly ? window.siyuan.languages.cancelTempUnlock : window.siyuan.languages.lockEdit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue