feat: add modify internal context menu interface #300

This commit is contained in:
Hufe921
2023-10-24 21:39:37 +08:00
parent 45e7eab119
commit 0891f053d2
15 changed files with 231 additions and 34 deletions
+1
View File
@@ -65,6 +65,7 @@ export interface IEditorOption {
printPixelRatio?: number
maskMargin?: IMargin
letterClass?: string[]
contextMenuDisableKeys?: string[]
wordBreak?: WordBreak
header?: IHeader
footer?: IFooter
@@ -14,11 +14,13 @@ export interface IContextMenuContext {
}
export interface IRegisterContextMenu {
key?: string
i18nPath?: string
isDivider?: boolean
icon?: string
name?: string
shortCut?: string
disable?: boolean
when?: (payload: IContextMenuContext) => boolean
callback?: (command: Command, context: IContextMenuContext) => any
childMenus?: IRegisterContextMenu[]