mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-16 20:18:06 +01:00
This commit is contained in:
parent
9157a6e6e6
commit
a2635a5520
5 changed files with 20 additions and 11 deletions
|
|
@ -214,10 +214,18 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
|
|||
} else {
|
||||
protyle = activeTab.model.editors.unRefEdit.protyle;
|
||||
}
|
||||
} else if (activeTab.model instanceof Custom && activeTab.model.data?.editor instanceof Protyle) {
|
||||
protyle = activeTab.model.data.editor.protyle;
|
||||
} else {
|
||||
return false;
|
||||
} else if (activeTab.model instanceof Custom && activeTab.model.editors?.length > 0) {
|
||||
if (range) {
|
||||
activeTab.model.editors.find(item => {
|
||||
if (item.protyle.element.contains(range.startContainer)) {
|
||||
protyle = item.protyle;
|
||||
return true;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
if (!protyle) {
|
||||
return;
|
||||
}
|
||||
} else if (!protyle) {
|
||||
if (!protyle && range) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue