mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-27 09:24:06 +01:00
This commit is contained in:
parent
92722ce3f3
commit
ec4da7cde7
6 changed files with 19 additions and 0 deletions
|
|
@ -655,6 +655,20 @@ export const contentMenu = (protyle: IProtyle, nodeElement: Element) => {
|
|||
updateTransaction(protyle, nodeElement.getAttribute("data-node-id"), nodeElement.outerHTML, oldHTML);
|
||||
}
|
||||
}).element);
|
||||
} else {
|
||||
// https://github.com/siyuan-note/siyuan/issues/9630
|
||||
const inlineElement = hasClosestByMatchTag(range.startContainer, "SPAN")
|
||||
if (inlineElement) {
|
||||
const inlineTypes = protyle.toolbar.getCurrentType(range);
|
||||
if (inlineTypes.includes("code") || inlineTypes.includes("kbd")) {
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.copyInline,
|
||||
click() {
|
||||
copyPlainText(inlineElement.textContent);
|
||||
}
|
||||
}).element);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!protyle.disabled) {
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue