This commit is contained in:
Vanessa 2023-11-19 15:49:20 +08:00
parent 92722ce3f3
commit ec4da7cde7
6 changed files with 19 additions and 0 deletions

View file

@ -1,4 +1,5 @@
{
"copyInline": "Copy inline element",
"unsplit": "Unsplit",
"unsplitAll": "Unsplit All",
"resetCardTip": "Are you sure reset ${x} flashcards?",

View file

@ -1,4 +1,5 @@
{
"copyInline": "Copiar elemento en línea",
"unsplit": "Desdividir",
"unsplitAll": "Desdividir Todo",
"resetCardTip": "¿Estás seguro de restablecer ${x} tarjetas?",

View file

@ -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 ?",

View file

@ -1,4 +1,5 @@
{
"copyInline": "複製行級元素",
"unsplit": "取消分割畫面",
"unsplitAll": "取消全部分螢幕",
"resetCardTip": "確定重設 ${x} 張閃卡?",

View file

@ -1,4 +1,5 @@
{
"copyInline": "复制行级元素",
"unsplit": "取消分屏",
"unsplitAll": "取消全部分屏",
"resetCardTip": "确定重置 ${x} 张闪卡?",

View file

@ -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({