@agilehub/agile-editor 1.4.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +367 -225
  2. package/dist/agile-editor.css +1 -1
  3. package/dist/agile-editor.js +10054 -7692
  4. package/dist/types/components/editor/index.vue.d.ts +2 -2
  5. package/dist/types/components/index.d.ts +4 -2
  6. package/dist/types/components/index.vue.d.ts +186 -12
  7. package/dist/types/components/menus/toolbar/tools/bubble-note.vue.d.ts +22 -1
  8. package/dist/types/components/preview-toolbar/annotation-shape.vue.d.ts +58 -0
  9. package/dist/types/components/preview-toolbar/drawing-layer.vue.d.ts +91 -0
  10. package/dist/types/components/preview-toolbar/geometry.d.ts +56 -0
  11. package/dist/types/components/preview-toolbar/index.vue.d.ts +200 -0
  12. package/dist/types/components/preview-toolbar/types.d.ts +48 -0
  13. package/dist/types/components/statusbar/countdown.vue.d.ts +19 -7
  14. package/dist/types/components/toolbar/classic.vue.d.ts +13 -13
  15. package/dist/types/components/toolbar/ribbon.vue.d.ts +7 -7
  16. package/dist/types/composables/i18n.d.ts +186 -12
  17. package/dist/types/extensions/bubble-note.d.ts +3 -0
  18. package/dist/types/extensions/element-style.d.ts +0 -1
  19. package/dist/types/extensions/footnotes/utils.d.ts +1 -0
  20. package/dist/types/i18n.d.ts +186 -12
  21. package/dist/types/options/config/dicts.d.ts +8 -0
  22. package/dist/types/options/config/index.d.ts +10 -1
  23. package/dist/types/utils/bubble-note-icon.d.ts +19 -0
  24. package/dist/types/utils/docx-json.d.ts +4 -1
  25. package/dist/types/utils/html-element-id.d.ts +9 -0
  26. package/dist/types/utils/html-id.d.ts +1 -0
  27. package/dist/types/utils/iframe.d.ts +5 -0
  28. package/dist/types/utils/style-target.d.ts +49 -0
  29. package/docs/README.md +40 -40
  30. package/docs/api.md +155 -155
  31. package/docs/architecture.md +133 -133
  32. package/docs/configuration.md +233 -233
  33. package/docs/custom-components.md +427 -277
  34. package/docs/development.md +85 -85
  35. package/docs/faq.md +98 -98
  36. package/docs/features.md +181 -181
  37. package/docs/menu-extension.md +276 -276
  38. package/package.json +12 -10
@@ -1,4 +1,3 @@
1
1
  import { Extension } from '@tiptap/core';
2
- export declare const styleableNodeTypes: string[];
3
2
  declare const _default: Extension<any, any>;
4
3
  export default _default;
@@ -1,3 +1,4 @@
1
+ export declare const FOOTNOTE_FOCUS_META = "footnoteFocusId";
1
2
  export declare const updateFootnoteReferences: (tr: any) => any[];
2
3
  export declare const syncFootnoteReferenceCaptions: (tr: any) => boolean;
3
4
  export declare const updateFootnotesList: (tr: any, state: any) => void;
@@ -382,6 +382,8 @@ export declare const i18n: import("vue-i18n").I18n<{
382
382
  placeholder: string;
383
383
  };
384
384
  footnote: string;
385
+ insertFootnote: string;
386
+ deleteFootnote: string;
385
387
  prompt: {
386
388
  text: string;
387
389
  title: string;
@@ -722,6 +724,9 @@ export declare const i18n: import("vue-i18n").I18n<{
722
724
  "bubble-note": {
723
725
  title: string;
724
726
  note: string;
727
+ "note-title": string;
728
+ "note-title-color": string;
729
+ "note-title-placeholder": string;
725
730
  annotation: string;
726
731
  "line-color": string;
727
732
  "line-type": string;
@@ -733,6 +738,23 @@ export declare const i18n: import("vue-i18n").I18n<{
733
738
  wavy: string;
734
739
  };
735
740
  placeholder: string;
741
+ "selection-required-error": string;
742
+ "non-text-content-error": string;
743
+ "cross-paragraph-error": string;
744
+ "max-length-error": string;
745
+ "already-exists-error": string;
746
+ "reference-link": string;
747
+ "reference-link-placeholder": string;
748
+ "invalid-reference-link": string;
749
+ "reference-icon": string;
750
+ "reference-icon-builtin": string;
751
+ "reference-icon-upload": string;
752
+ "reference-icon-placeholder": string;
753
+ "reference-icon-invalid": string;
754
+ "reference-icon-upload-failed": string;
755
+ edit: string;
756
+ delete: string;
757
+ "open-reference": string;
736
758
  cancel: string;
737
759
  confirm: string;
738
760
  };
@@ -1022,10 +1044,6 @@ export declare const i18n: import("vue-i18n").I18n<{
1022
1044
  hide: string;
1023
1045
  empty: string;
1024
1046
  };
1025
- spellcheck: {
1026
- enable: string;
1027
- disable: string;
1028
- };
1029
1047
  shortcut: {
1030
1048
  title: string;
1031
1049
  text: string;
@@ -1076,6 +1094,45 @@ export declare const i18n: import("vue-i18n").I18n<{
1076
1094
  preview: {
1077
1095
  title: string;
1078
1096
  disable: string;
1097
+ drawing: {
1098
+ title: string;
1099
+ hiddenTitle: string;
1100
+ tools: {
1101
+ title: string;
1102
+ rectangle: string;
1103
+ line: string;
1104
+ path: string;
1105
+ };
1106
+ color: {
1107
+ title: string;
1108
+ custom: string;
1109
+ };
1110
+ width: {
1111
+ title: string;
1112
+ thin: string;
1113
+ default: string;
1114
+ thick: string;
1115
+ extraThick: string;
1116
+ };
1117
+ strokeStyles: {
1118
+ title: string;
1119
+ solid: string;
1120
+ dashed: string;
1121
+ wavy: string;
1122
+ };
1123
+ select: string;
1124
+ deleteSelected: string;
1125
+ undo: string;
1126
+ save: string;
1127
+ saving: string;
1128
+ saved: string;
1129
+ hideAnnotations: string;
1130
+ showAnnotations: string;
1131
+ restorePage: string;
1132
+ clearAll: string;
1133
+ confirmClear: string;
1134
+ count: string;
1135
+ };
1079
1136
  countdown: {
1080
1137
  title: string;
1081
1138
  select: string;
@@ -1100,6 +1157,7 @@ export declare const i18n: import("vue-i18n").I18n<{
1100
1157
  remaining: string;
1101
1158
  };
1102
1159
  laserPointer: string;
1160
+ hideToolbar: string;
1103
1161
  };
1104
1162
  fullscreen: {
1105
1163
  title: string;
@@ -1584,6 +1642,8 @@ export declare const i18n: import("vue-i18n").I18n<{
1584
1642
  placeholder: string;
1585
1643
  };
1586
1644
  footnote: string;
1645
+ insertFootnote: string;
1646
+ deleteFootnote: string;
1587
1647
  prompt: {
1588
1648
  text: string;
1589
1649
  title: string;
@@ -1939,6 +1999,9 @@ export declare const i18n: import("vue-i18n").I18n<{
1939
1999
  "bubble-note": {
1940
2000
  title: string;
1941
2001
  note: string;
2002
+ "note-title": string;
2003
+ "note-title-color": string;
2004
+ "note-title-placeholder": string;
1942
2005
  annotation: string;
1943
2006
  "line-color": string;
1944
2007
  "line-type": string;
@@ -1950,6 +2013,23 @@ export declare const i18n: import("vue-i18n").I18n<{
1950
2013
  wavy: string;
1951
2014
  };
1952
2015
  placeholder: string;
2016
+ "selection-required-error": string;
2017
+ "non-text-content-error": string;
2018
+ "cross-paragraph-error": string;
2019
+ "max-length-error": string;
2020
+ "already-exists-error": string;
2021
+ "reference-link": string;
2022
+ "reference-link-placeholder": string;
2023
+ "invalid-reference-link": string;
2024
+ "reference-icon": string;
2025
+ "reference-icon-builtin": string;
2026
+ "reference-icon-upload": string;
2027
+ "reference-icon-placeholder": string;
2028
+ "reference-icon-invalid": string;
2029
+ "reference-icon-upload-failed": string;
2030
+ edit: string;
2031
+ delete: string;
2032
+ "open-reference": string;
1953
2033
  cancel: string;
1954
2034
  confirm: string;
1955
2035
  };
@@ -2229,10 +2309,6 @@ export declare const i18n: import("vue-i18n").I18n<{
2229
2309
  hide: string;
2230
2310
  empty: string;
2231
2311
  };
2232
- spellcheck: {
2233
- enable: string;
2234
- disable: string;
2235
- };
2236
2312
  shortcut: {
2237
2313
  title: string;
2238
2314
  text: string;
@@ -2283,6 +2359,45 @@ export declare const i18n: import("vue-i18n").I18n<{
2283
2359
  preview: {
2284
2360
  title: string;
2285
2361
  disable: string;
2362
+ drawing: {
2363
+ title: string;
2364
+ hiddenTitle: string;
2365
+ tools: {
2366
+ title: string;
2367
+ rectangle: string;
2368
+ line: string;
2369
+ path: string;
2370
+ };
2371
+ color: {
2372
+ title: string;
2373
+ custom: string;
2374
+ };
2375
+ width: {
2376
+ title: string;
2377
+ thin: string;
2378
+ default: string;
2379
+ thick: string;
2380
+ extraThick: string;
2381
+ };
2382
+ strokeStyles: {
2383
+ title: string;
2384
+ solid: string;
2385
+ dashed: string;
2386
+ wavy: string;
2387
+ };
2388
+ select: string;
2389
+ deleteSelected: string;
2390
+ undo: string;
2391
+ save: string;
2392
+ saving: string;
2393
+ saved: string;
2394
+ hideAnnotations: string;
2395
+ showAnnotations: string;
2396
+ restorePage: string;
2397
+ clearAll: string;
2398
+ confirmClear: string;
2399
+ count: string;
2400
+ };
2286
2401
  countdown: {
2287
2402
  title: string;
2288
2403
  select: string;
@@ -2307,6 +2422,7 @@ export declare const i18n: import("vue-i18n").I18n<{
2307
2422
  remaining: string;
2308
2423
  };
2309
2424
  laserPointer: string;
2425
+ hideToolbar: string;
2310
2426
  };
2311
2427
  fullscreen: {
2312
2428
  title: string;
@@ -2778,6 +2894,8 @@ export declare const i18n: import("vue-i18n").I18n<{
2778
2894
  placeholder: string;
2779
2895
  };
2780
2896
  footnote: string;
2897
+ insertFootnote: string;
2898
+ deleteFootnote: string;
2781
2899
  prompt: {
2782
2900
  text: string;
2783
2901
  title: string;
@@ -3133,6 +3251,9 @@ export declare const i18n: import("vue-i18n").I18n<{
3133
3251
  "bubble-note": {
3134
3252
  title: string;
3135
3253
  note: string;
3254
+ "note-title": string;
3255
+ "note-title-color": string;
3256
+ "note-title-placeholder": string;
3136
3257
  annotation: string;
3137
3258
  "line-color": string;
3138
3259
  "line-type": string;
@@ -3144,6 +3265,23 @@ export declare const i18n: import("vue-i18n").I18n<{
3144
3265
  wavy: string;
3145
3266
  };
3146
3267
  placeholder: string;
3268
+ "selection-required-error": string;
3269
+ "non-text-content-error": string;
3270
+ "cross-paragraph-error": string;
3271
+ "max-length-error": string;
3272
+ "already-exists-error": string;
3273
+ "reference-link": string;
3274
+ "reference-link-placeholder": string;
3275
+ "invalid-reference-link": string;
3276
+ "reference-icon": string;
3277
+ "reference-icon-builtin": string;
3278
+ "reference-icon-upload": string;
3279
+ "reference-icon-placeholder": string;
3280
+ "reference-icon-invalid": string;
3281
+ "reference-icon-upload-failed": string;
3282
+ edit: string;
3283
+ delete: string;
3284
+ "open-reference": string;
3147
3285
  cancel: string;
3148
3286
  confirm: string;
3149
3287
  };
@@ -3423,10 +3561,6 @@ export declare const i18n: import("vue-i18n").I18n<{
3423
3561
  hide: string;
3424
3562
  empty: string;
3425
3563
  };
3426
- spellcheck: {
3427
- enable: string;
3428
- disable: string;
3429
- };
3430
3564
  shortcut: {
3431
3565
  title: string;
3432
3566
  text: string;
@@ -3477,6 +3611,45 @@ export declare const i18n: import("vue-i18n").I18n<{
3477
3611
  preview: {
3478
3612
  title: string;
3479
3613
  disable: string;
3614
+ drawing: {
3615
+ title: string;
3616
+ hiddenTitle: string;
3617
+ tools: {
3618
+ title: string;
3619
+ rectangle: string;
3620
+ line: string;
3621
+ path: string;
3622
+ };
3623
+ color: {
3624
+ title: string;
3625
+ custom: string;
3626
+ };
3627
+ width: {
3628
+ title: string;
3629
+ thin: string;
3630
+ default: string;
3631
+ thick: string;
3632
+ extraThick: string;
3633
+ };
3634
+ strokeStyles: {
3635
+ title: string;
3636
+ solid: string;
3637
+ dashed: string;
3638
+ wavy: string;
3639
+ };
3640
+ select: string;
3641
+ deleteSelected: string;
3642
+ undo: string;
3643
+ save: string;
3644
+ saving: string;
3645
+ saved: string;
3646
+ hideAnnotations: string;
3647
+ showAnnotations: string;
3648
+ restorePage: string;
3649
+ clearAll: string;
3650
+ confirmClear: string;
3651
+ count: string;
3652
+ };
3480
3653
  countdown: {
3481
3654
  title: string;
3482
3655
  select: string;
@@ -3501,6 +3674,7 @@ export declare const i18n: import("vue-i18n").I18n<{
3501
3674
  remaining: string;
3502
3675
  };
3503
3676
  laserPointer: string;
3677
+ hideToolbar: string;
3504
3678
  };
3505
3679
  fullscreen: {
3506
3680
  title: string;
@@ -1,3 +1,11 @@
1
+ export declare const bubbleNoteIcons: {
2
+ label: {
3
+ zh_CN: string;
4
+ en_US: string;
5
+ };
6
+ value: string;
7
+ svg: string;
8
+ }[];
1
9
  declare const _default: {
2
10
  fonts: ({
3
11
  label: {
@@ -64,6 +64,16 @@ declare const _default: {
64
64
  default?: undefined;
65
65
  })[];
66
66
  };
67
+ bubbleNote: {
68
+ referenceIcons: {
69
+ label: {
70
+ zh_CN: string;
71
+ en_US: string;
72
+ };
73
+ value: string;
74
+ svg: string;
75
+ }[];
76
+ };
67
77
  toolbar: {
68
78
  showSaveLabel: boolean;
69
79
  defaultMode: string;
@@ -103,7 +113,6 @@ declare const _default: {
103
113
  zh_CN: string;
104
114
  };
105
115
  structure: string;
106
- enableSpellcheck: boolean;
107
116
  enableMarkdown: boolean;
108
117
  enableBubbleMenu: boolean;
109
118
  enableBlockMenu: boolean;
@@ -0,0 +1,19 @@
1
+ type BubbleNoteIconDefinition = {
2
+ svg?: string;
3
+ base64?: string;
4
+ value?: string;
5
+ };
6
+ export declare const normalizeBubbleNoteIconName: (value: any) => string;
7
+ export declare const normalizeBubbleNoteIconImage: (value: any) => string;
8
+ export declare const svgCodeToDataUrl: (value: any) => string;
9
+ export declare const base64ImageToDataUrl: (value: any) => string;
10
+ export declare const resolveBubbleNoteIconSource: (definition?: BubbleNoteIconDefinition) => {
11
+ type: string;
12
+ src: string;
13
+ name?: undefined;
14
+ } | {
15
+ type: string;
16
+ name: string;
17
+ src?: undefined;
18
+ };
19
+ export {};
@@ -10,5 +10,8 @@ type TiptapNode = {
10
10
  text?: string;
11
11
  marks?: TiptapMark[];
12
12
  };
13
- export declare const convertDocxJsonToTiptap: (document: HtmlJsonDocument) => TiptapNode[];
13
+ export declare const convertDocxJsonToTiptap: (document: HtmlJsonDocument, options?: {
14
+ footnotes?: boolean;
15
+ annotations?: boolean;
16
+ }) => TiptapNode[];
14
17
  export {};
@@ -0,0 +1,9 @@
1
+ import type { EditorState } from '@tiptap/pm/state';
2
+ export declare const nodeTypesWithOwnId: Set<string>;
3
+ export declare const nodeTypesWithoutHtmlId: Set<string>;
4
+ export declare const htmlIdNodeTypes: string[];
5
+ export declare const htmlIdMarkTypes: string[];
6
+ export declare const ensureHtmlElementIds: (state: EditorState, range?: {
7
+ from: number;
8
+ to: number;
9
+ }) => import("@tiptap/pm/state").Transaction;
@@ -0,0 +1 @@
1
+ export declare const createHtmlId: () => string;
@@ -0,0 +1,5 @@
1
+ export declare const disableIframeAutoplay: (value: string) => string;
2
+ export declare const normalizeIframeDimensions: (width: unknown, maxWidth: number) => {
3
+ width: number;
4
+ height: number;
5
+ };
@@ -0,0 +1,49 @@
1
+ import type { Mark, Node as ProseMirrorNode } from '@tiptap/pm/model';
2
+ export type StyleTargetBase = {
3
+ value: string;
4
+ label: string;
5
+ depth: number;
6
+ };
7
+ export type StyleTarget = StyleTargetBase & ({
8
+ kind: 'text';
9
+ } | {
10
+ kind: 'node';
11
+ position: number;
12
+ nodeType: string;
13
+ } | {
14
+ kind: 'mark';
15
+ markName: string;
16
+ styleAttribute: string;
17
+ from: number;
18
+ to: number;
19
+ } | {
20
+ kind: 'imageChild';
21
+ position: number;
22
+ attribute: 'imageStyle' | 'captionStyle';
23
+ });
24
+ export declare const nodeTagNames: Record<string, string>;
25
+ export declare const styleableNodeTypes: string[];
26
+ export declare const getNodeTargetLabel: (node: {
27
+ type: {
28
+ name: string;
29
+ };
30
+ attrs?: Record<string, unknown>;
31
+ }) => string;
32
+ type InlineMarkConfig = {
33
+ label: string;
34
+ styleAttribute: string;
35
+ };
36
+ export declare const spanMarkNames: Set<string>;
37
+ export declare const inlineMarkConfigs: Record<string, InlineMarkConfig>;
38
+ export declare const styleableMarkTypes: string[];
39
+ export declare const globalStyleMarkTypes: string[];
40
+ export declare const inlineMarkNames: Set<string>;
41
+ export declare const hasStyleSpanMark: (marks: readonly Mark[]) => boolean;
42
+ export declare const stripBubbleNoteDecorationStyles: (styleText: string) => string;
43
+ export declare const createBubbleNoteEditableStyle: (attrs: {
44
+ lineType?: string;
45
+ lineColor?: string;
46
+ inlineStyle?: string;
47
+ }) => string;
48
+ export declare const getInlineMarkTargets: (textNode: ProseMirrorNode | undefined, doc: ProseMirrorNode, from: number, depth: number) => StyleTarget[];
49
+ export {};
package/docs/README.md CHANGED
@@ -1,40 +1,40 @@
1
- # Agile Editor 文档
2
-
3
- README 只保留基础接入信息,本目录按使用场景组织详细文档。
4
-
5
- ## 推荐阅读顺序
6
-
7
- 1. [完整配置](./configuration.md):了解组件的全部常用配置、保存和文件上传。
8
- 2. [组件方法与事件](./api.md):通过组件 `ref` 操作文档和监听状态。
9
- 3. [功能说明](./features.md):了解 DOCX 导入、公式、播放器、图表和时间轴。
10
- 4. [菜单扩展](./menu-extension.md):在工具栏中添加自己的按钮。
11
- 5. [外部组件接入](./custom-components.md):把业务弹窗、面板和 Vue 组件接入编辑器。
12
-
13
- 准备开发新的文档节点或发布插件时,再阅读 [二次开发指南](./SECONDARY_DEVELOPMENT.md)。
14
-
15
- ## 文档索引
16
-
17
- | 文档 | 适用场景 |
18
- | --- | --- |
19
- | [完整配置](./configuration.md) | 配置优先级、页面布局、保存、上传、删除 |
20
- | [组件方法与事件](./api.md) | 方法签名、参数、事件和 Tiptap 实例 |
21
- | [功能说明](./features.md) | DOCX、公式、播放器、图表、时间轴和排版 |
22
- | [菜单扩展](./menu-extension.md) | 业务项目插槽按钮、源码菜单和一级菜单 |
23
- | [外部组件接入](./custom-components.md) | 业务按钮、弹窗、面板、NodeView 和样式 |
24
- | [二次开发指南](./SECONDARY_DEVELOPMENT.md) | 自定义 Tiptap 扩展和完整开发流程 |
25
- | [本地开发](./development.md) | 环境、命令、构建和发布 |
26
- | [架构与数据流](./architecture.md) | 目录结构、依赖注入、状态和缓存 |
27
- | [一键排版模板](./FORMATTING_TEMPLATES.md) | 模板 JSON、样式规则和节点适配 |
28
- | [常见问题](./faq.md) | 配置、保存、上传、菜单和样式排查 |
29
-
30
- ## 选择扩展方式
31
-
32
- | 目标 | 推荐方式 | 是否需要修改本仓库 |
33
- | --- | --- | --- |
34
- | 添加业务按钮 | `toolbar_*` 插槽 + 自己的 Vue 组件 | 否 |
35
- | 打开业务弹窗或表单 | Vue 组件 + `created` 获取 Editor | 否 |
36
- | 新增文档节点 | Tiptap Extension + NodeView | 业务扩展不需要;内置功能需要 |
37
- | 修改内置菜单 | 修改 `classic.vue` 和 `ribbon.vue` | 是 |
38
- | 新增一级工具栏菜单 | 修改配置、布局、语言和插槽 | 是 |
39
-
40
- 工具栏按钮负责界面和触发操作,Tiptap 扩展负责文档结构、命令和保存格式。注册扩展不会自动生成按钮,添加按钮也不会自动注册节点。
1
+ # Agile Editor 文档
2
+
3
+ README 只保留基础接入信息,本目录按使用场景组织详细文档。
4
+
5
+ ## 推荐阅读顺序
6
+
7
+ 1. [完整配置](./configuration.md):了解组件的全部常用配置、保存和文件上传。
8
+ 2. [组件方法与事件](./api.md):通过组件 `ref` 操作文档和监听状态。
9
+ 3. [功能说明](./features.md):了解 DOCX 导入、公式、播放器、图表和时间轴。
10
+ 4. [菜单扩展](./menu-extension.md):在工具栏中添加自己的按钮。
11
+ 5. [外部组件接入](./custom-components.md):把业务弹窗、面板和 Vue 组件接入编辑器。
12
+
13
+ 准备开发新的文档节点或发布插件时,再阅读 [二次开发指南](./SECONDARY_DEVELOPMENT.md)。
14
+
15
+ ## 文档索引
16
+
17
+ | 文档 | 适用场景 |
18
+ | --- | --- |
19
+ | [完整配置](./configuration.md) | 配置优先级、页面布局、保存、上传、删除 |
20
+ | [组件方法与事件](./api.md) | 方法签名、参数、事件和 Tiptap 实例 |
21
+ | [功能说明](./features.md) | DOCX、公式、播放器、图表、时间轴和排版 |
22
+ | [菜单扩展](./menu-extension.md) | 业务项目插槽按钮、源码菜单和一级菜单 |
23
+ | [外部组件接入](./custom-components.md) | 业务按钮、弹窗、面板、NodeView 和样式 |
24
+ | [二次开发指南](./SECONDARY_DEVELOPMENT.md) | 自定义 Tiptap 扩展和完整开发流程 |
25
+ | [本地开发](./development.md) | 环境、命令、构建和发布 |
26
+ | [架构与数据流](./architecture.md) | 目录结构、依赖注入、状态和缓存 |
27
+ | [一键排版模板](./FORMATTING_TEMPLATES.md) | 模板 JSON、样式规则和节点适配 |
28
+ | [常见问题](./faq.md) | 配置、保存、上传、菜单和样式排查 |
29
+
30
+ ## 选择扩展方式
31
+
32
+ | 目标 | 推荐方式 | 是否需要修改本仓库 |
33
+ | --- | --- | --- |
34
+ | 添加业务按钮 | `toolbar_*` 插槽 + 自己的 Vue 组件 | 否 |
35
+ | 打开业务弹窗或表单 | Vue 组件 + `created` 获取 Editor | 否 |
36
+ | 新增文档节点 | Tiptap Extension + NodeView | 业务扩展不需要;内置功能需要 |
37
+ | 修改内置菜单 | 修改 `classic.vue` 和 `ribbon.vue` | 是 |
38
+ | 新增一级工具栏菜单 | 修改配置、布局、语言和插槽 | 是 |
39
+
40
+ 工具栏按钮负责界面和触发操作,Tiptap 扩展负责文档结构、命令和保存格式。注册扩展不会自动生成按钮,添加按钮也不会自动注册节点。