给块标菜单的 button 添加 data-id 属性 (#12525)

* 更新 index.ts

* 更新 index.ts

* 更新 index.ts

* separator

* copySubMenu

* copyText

* assetSubMenu → blockEmbed

* transferBlockRef

* appearance

* 更新 index.ts

* orderedList

* 更新 index.ts

* Revert "orderedList"

This reverts commit 29db8193ca.

* add id

Revert "orderedList"

* separator

* 'data-id': options.id

* separator

* options.id

* type: "readonly"

* turnsOneInto

* turnsIntoOne

* turnsInto

* assetSubMenu
This commit is contained in:
Jeffrey Chen 2024-09-22 09:16:22 +08:00 committed by GitHub
parent 70c7313524
commit 2f37965192
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 142 additions and 49 deletions

View file

@ -372,6 +372,7 @@ export const openAttr = (nodeElement: Element, focusName = "bookmark", protyle?:
export const copySubMenu = (id: string, accelerator = true, focusElement?: Element) => {
return [{
id: "copyBlockRef",
iconHTML: "",
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyBlockRef.custom : undefined,
label: window.siyuan.languages.copyBlockRef,
@ -384,6 +385,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
}
}
}, {
id: "copyBlockEmbed",
iconHTML: "",
label: window.siyuan.languages.copyBlockEmbed,
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyBlockEmbed.custom : undefined,
@ -394,6 +396,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
}
}
}, {
id: "copyProtocol",
iconHTML: "",
label: window.siyuan.languages.copyProtocol,
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyProtocol.custom : undefined,
@ -404,6 +407,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
}
}
}, {
id: "copyProtocolInMd",
iconHTML: "",
label: window.siyuan.languages.copyProtocolInMd,
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyProtocolInMd.custom : undefined,
@ -416,6 +420,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
}
}
}, {
id: "copyHPath",
iconHTML: "",
label: window.siyuan.languages.copyHPath,
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyHPath.custom : undefined,
@ -427,6 +432,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
});
}
}, {
id: "copyID",
iconHTML: "",
label: window.siyuan.languages.copyID,
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyID.custom : undefined,