This commit is contained in:
parent
92722ce3f3
commit
ec4da7cde7
6 changed files with 19 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"copyInline": "Copy inline element",
|
||||
"unsplit": "Unsplit",
|
||||
"unsplitAll": "Unsplit All",
|
||||
"resetCardTip": "Are you sure reset ${x} flashcards?",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"copyInline": "Copiar elemento en línea",
|
||||
"unsplit": "Desdividir",
|
||||
"unsplitAll": "Desdividir Todo",
|
||||
"resetCardTip": "¿Estás seguro de restablecer ${x} tarjetas?",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"copyInline": "Copier l'élément en ligne",
|
||||
"unsplit": "Unsplit",
|
||||
"unsplitAll": "Tout dédiviser",
|
||||
"resetCardTip": "Êtes-vous sûr de réinitialiser ${x} flashcards ?",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"copyInline": "複製行級元素",
|
||||
"unsplit": "取消分割畫面",
|
||||
"unsplitAll": "取消全部分螢幕",
|
||||
"resetCardTip": "確定重設 ${x} 張閃卡?",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"copyInline": "复制行级元素",
|
||||
"unsplit": "取消分屏",
|
||||
"unsplitAll": "取消全部分屏",
|
||||
"resetCardTip": "确定重置 ${x} 张闪卡?",
|
||||
|
|
|
@ -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
Reference in a new issue