editor-svg 1.0.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 (472) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintrc +46 -0
  3. package/.prettierrc +8 -0
  4. package/AGENTS.md +186 -0
  5. package/CHANGELOG.md +2543 -0
  6. package/CLAUDE.md +110 -0
  7. package/LICENSE +21 -0
  8. package/README.md +110 -0
  9. package/cypress/e2e/control/checkbox.cy.ts +46 -0
  10. package/cypress/e2e/control/select.cy.ts +56 -0
  11. package/cypress/e2e/control/text.cy.ts +43 -0
  12. package/cypress/e2e/editor.cy.ts +67 -0
  13. package/cypress/e2e/menus/block.cy.ts +38 -0
  14. package/cypress/e2e/menus/checkbox.cy.ts +33 -0
  15. package/cypress/e2e/menus/codeblock.cy.ts +34 -0
  16. package/cypress/e2e/menus/date.cy.ts +28 -0
  17. package/cypress/e2e/menus/format.cy.ts +40 -0
  18. package/cypress/e2e/menus/hyperlink.cy.ts +39 -0
  19. package/cypress/e2e/menus/image.cy.ts +25 -0
  20. package/cypress/e2e/menus/latex.cy.ts +34 -0
  21. package/cypress/e2e/menus/pagebreak.cy.ts +21 -0
  22. package/cypress/e2e/menus/painter.cy.ts +53 -0
  23. package/cypress/e2e/menus/print.cy.ts +25 -0
  24. package/cypress/e2e/menus/row.cy.ts +103 -0
  25. package/cypress/e2e/menus/search.cy.ts +112 -0
  26. package/cypress/e2e/menus/separator.cy.ts +32 -0
  27. package/cypress/e2e/menus/table.cy.ts +25 -0
  28. package/cypress/e2e/menus/text.cy.ts +304 -0
  29. package/cypress/e2e/menus/title.cy.ts +43 -0
  30. package/cypress/e2e/menus/undoRedo.cy.ts +49 -0
  31. package/cypress/e2e/menus/watermark.cy.ts +64 -0
  32. package/cypress/fixtures/example.json +3 -0
  33. package/cypress/fixtures/test.png +0 -0
  34. package/cypress/global.d.ts +13 -0
  35. package/cypress/support/commands.ts +5 -0
  36. package/cypress/support/e2e.ts +1 -0
  37. package/cypress/tsconfig.json +21 -0
  38. package/cypress.config.ts +10 -0
  39. package/docs/.vitepress/config.ts +191 -0
  40. package/docs/.vitepress/theme/components/DeepWikiBadge.vue +21 -0
  41. package/docs/.vitepress/theme/components/ZreadBadge.vue +21 -0
  42. package/docs/.vitepress/theme/index.ts +27 -0
  43. package/docs/en/guide/api-common.md +49 -0
  44. package/docs/en/guide/api-instance.md +34 -0
  45. package/docs/en/guide/command-execute.md +1167 -0
  46. package/docs/en/guide/command-get.md +355 -0
  47. package/docs/en/guide/contextmenu-custom.md +44 -0
  48. package/docs/en/guide/contextmenu-internal.md +61 -0
  49. package/docs/en/guide/eventbus.md +260 -0
  50. package/docs/en/guide/i18n.md +112 -0
  51. package/docs/en/guide/listener.md +126 -0
  52. package/docs/en/guide/option.md +214 -0
  53. package/docs/en/guide/override.md +57 -0
  54. package/docs/en/guide/plugin-custom.md +25 -0
  55. package/docs/en/guide/plugin-internal.md +125 -0
  56. package/docs/en/guide/schema.md +237 -0
  57. package/docs/en/guide/shortcut-custom.md +22 -0
  58. package/docs/en/guide/shortcut-internal.md +189 -0
  59. package/docs/en/guide/start.md +97 -0
  60. package/docs/en/index.md +43 -0
  61. package/docs/guide/api-common.md +49 -0
  62. package/docs/guide/api-instance.md +34 -0
  63. package/docs/guide/command-execute.md +1157 -0
  64. package/docs/guide/command-get.md +353 -0
  65. package/docs/guide/contextmenu-custom.md +44 -0
  66. package/docs/guide/contextmenu-internal.md +61 -0
  67. package/docs/guide/eventbus.md +260 -0
  68. package/docs/guide/i18n.md +111 -0
  69. package/docs/guide/listener.md +126 -0
  70. package/docs/guide/option.md +214 -0
  71. package/docs/guide/override.md +57 -0
  72. package/docs/guide/plugin-custom.md +25 -0
  73. package/docs/guide/plugin-internal.md +125 -0
  74. package/docs/guide/schema.md +237 -0
  75. package/docs/guide/shortcut-custom.md +22 -0
  76. package/docs/guide/shortcut-internal.md +189 -0
  77. package/docs/guide/start.md +97 -0
  78. package/docs/index.md +43 -0
  79. package/docs/public/favicon.png +0 -0
  80. package/favicon.png +0 -0
  81. package/index.html +435 -0
  82. package/package.json +55 -0
  83. package/pnpm-lock.yaml +4113 -0
  84. package/scripts/release.js +41 -0
  85. package/scripts/verifyCommit.js +19 -0
  86. package/src/assets/images/alignment.svg +1 -0
  87. package/src/assets/images/arrow-left.svg +1 -0
  88. package/src/assets/images/arrow-right.svg +1 -0
  89. package/src/assets/images/block.svg +1 -0
  90. package/src/assets/images/bold.svg +1 -0
  91. package/src/assets/images/catalog.svg +1 -0
  92. package/src/assets/images/center.svg +1 -0
  93. package/src/assets/images/checkbox.svg +1 -0
  94. package/src/assets/images/close.svg +1 -0
  95. package/src/assets/images/codeblock.svg +1 -0
  96. package/src/assets/images/color.svg +1 -0
  97. package/src/assets/images/control.svg +1 -0
  98. package/src/assets/images/date.svg +1 -0
  99. package/src/assets/images/exit-fullscreen.svg +1 -0
  100. package/src/assets/images/format.svg +1 -0
  101. package/src/assets/images/highlight.svg +1 -0
  102. package/src/assets/images/hyperlink.svg +1 -0
  103. package/src/assets/images/image.svg +1 -0
  104. package/src/assets/images/italic.svg +1 -0
  105. package/src/assets/images/justify.svg +7 -0
  106. package/src/assets/images/latex.svg +1 -0
  107. package/src/assets/images/left.svg +1 -0
  108. package/src/assets/images/line-dash-dot-dot.svg +1 -0
  109. package/src/assets/images/line-dash-dot.svg +1 -0
  110. package/src/assets/images/line-dash-large-gap.svg +1 -0
  111. package/src/assets/images/line-dash-small-gap.svg +1 -0
  112. package/src/assets/images/line-dot.svg +1 -0
  113. package/src/assets/images/line-double.svg +1 -0
  114. package/src/assets/images/line-single.svg +1 -0
  115. package/src/assets/images/line-wavy.svg +1 -0
  116. package/src/assets/images/list.svg +1 -0
  117. package/src/assets/images/option.svg +1 -0
  118. package/src/assets/images/page-break.svg +1 -0
  119. package/src/assets/images/page-mode.svg +1 -0
  120. package/src/assets/images/page-scale-add.svg +1 -0
  121. package/src/assets/images/page-scale-minus.svg +1 -0
  122. package/src/assets/images/painter.svg +1 -0
  123. package/src/assets/images/paper-direction.svg +1 -0
  124. package/src/assets/images/paper-margin.svg +1 -0
  125. package/src/assets/images/paper-size.svg +1 -0
  126. package/src/assets/images/print.svg +1 -0
  127. package/src/assets/images/radio.svg +4 -0
  128. package/src/assets/images/redo.svg +1 -0
  129. package/src/assets/images/request-fullscreen.svg +1 -0
  130. package/src/assets/images/right.svg +1 -0
  131. package/src/assets/images/row-margin.svg +1 -0
  132. package/src/assets/images/search.svg +1 -0
  133. package/src/assets/images/separator.svg +1 -0
  134. package/src/assets/images/signature-undo.svg +1 -0
  135. package/src/assets/images/signature.svg +1 -0
  136. package/src/assets/images/size-add.svg +1 -0
  137. package/src/assets/images/size-minus.svg +1 -0
  138. package/src/assets/images/strikeout.svg +1 -0
  139. package/src/assets/images/subscript.svg +1 -0
  140. package/src/assets/images/superscript.svg +1 -0
  141. package/src/assets/images/table.svg +1 -0
  142. package/src/assets/images/title.svg +1 -0
  143. package/src/assets/images/trash.svg +1 -0
  144. package/src/assets/images/underline.svg +1 -0
  145. package/src/assets/images/undo.svg +1 -0
  146. package/src/assets/images/watermark.svg +1 -0
  147. package/src/assets/images/word-tool.svg +1 -0
  148. package/src/assets/snapshots/main_v0.2.1.png +0 -0
  149. package/src/assets/snapshots/main_v0.2.2.png +0 -0
  150. package/src/assets/snapshots/main_v0.3.0.png +0 -0
  151. package/src/assets/snapshots/main_v0.3.1.png +0 -0
  152. package/src/assets/snapshots/main_v0.5.0.png +0 -0
  153. package/src/assets/snapshots/main_v0.5.1.png +0 -0
  154. package/src/assets/snapshots/main_v0.6.0.png +0 -0
  155. package/src/assets/snapshots/main_v0.6.1.png +0 -0
  156. package/src/assets/snapshots/main_v0.7.0.png +0 -0
  157. package/src/assets/snapshots/main_v0.7.1.png +0 -0
  158. package/src/assets/snapshots/main_v0.7.2.png +0 -0
  159. package/src/assets/snapshots/main_v0.7.3.png +0 -0
  160. package/src/assets/snapshots/main_v0.7.4.png +0 -0
  161. package/src/assets/snapshots/main_v0.7.6.png +0 -0
  162. package/src/assets/snapshots/main_v0.7.7.png +0 -0
  163. package/src/assets/snapshots/main_v0.8.0.png +0 -0
  164. package/src/assets/snapshots/main_v0.8.5.png +0 -0
  165. package/src/assets/snapshots/main_v0.8.6.png +0 -0
  166. package/src/assets/snapshots/main_v0.8.7.png +0 -0
  167. package/src/assets/snapshots/main_v0.8.8.png +0 -0
  168. package/src/assets/snapshots/main_v0.9.0.png +0 -0
  169. package/src/assets/snapshots/main_v0.9.1.png +0 -0
  170. package/src/assets/snapshots/main_v0.9.2.png +0 -0
  171. package/src/assets/snapshots/main_v0.9.23.png +0 -0
  172. package/src/assets/snapshots/main_v0.9.28.png +0 -0
  173. package/src/assets/snapshots/main_v0.9.29.png +0 -0
  174. package/src/assets/snapshots/main_v0.9.3.png +0 -0
  175. package/src/assets/snapshots/main_v0.9.30.png +0 -0
  176. package/src/assets/snapshots/main_v0.9.32.png +0 -0
  177. package/src/assets/snapshots/main_v0.9.35.png +0 -0
  178. package/src/assets/snapshots/main_v0.9.4.png +0 -0
  179. package/src/assets/snapshots/main_v0.9.5.png +0 -0
  180. package/src/assets/snapshots/main_v0.9.6.png +0 -0
  181. package/src/assets/snapshots/main_v0.9.8.png +0 -0
  182. package/src/components/dialog/Dialog.ts +171 -0
  183. package/src/components/dialog/dialog.css +131 -0
  184. package/src/components/signature/Signature.ts +340 -0
  185. package/src/components/signature/signature.css +132 -0
  186. package/src/editor/assets/css/block/block.css +21 -0
  187. package/src/editor/assets/css/contextmenu/contextmenu.css +196 -0
  188. package/src/editor/assets/css/control/calculator.css +85 -0
  189. package/src/editor/assets/css/control/select.css +44 -0
  190. package/src/editor/assets/css/date/datePicker.css +233 -0
  191. package/src/editor/assets/css/hyperlink/hyperlink.css +26 -0
  192. package/src/editor/assets/css/index.css +78 -0
  193. package/src/editor/assets/css/previewer/previewer.css +122 -0
  194. package/src/editor/assets/css/resizer/resizer.css +74 -0
  195. package/src/editor/assets/css/table/table.css +155 -0
  196. package/src/editor/assets/css/zone/zone.css +61 -0
  197. package/src/editor/assets/images/close.svg +1 -0
  198. package/src/editor/assets/images/delete-col.svg +1 -0
  199. package/src/editor/assets/images/delete-row-col.svg +1 -0
  200. package/src/editor/assets/images/delete-row.svg +1 -0
  201. package/src/editor/assets/images/delete-table.svg +1 -0
  202. package/src/editor/assets/images/image-change.svg +1 -0
  203. package/src/editor/assets/images/image-download.svg +1 -0
  204. package/src/editor/assets/images/image-next.svg +1 -0
  205. package/src/editor/assets/images/image-pre.svg +1 -0
  206. package/src/editor/assets/images/image.svg +1 -0
  207. package/src/editor/assets/images/insert-bottom-row.svg +1 -0
  208. package/src/editor/assets/images/insert-left-col.svg +1 -0
  209. package/src/editor/assets/images/insert-right-col.svg +1 -0
  210. package/src/editor/assets/images/insert-row-col.svg +1 -0
  211. package/src/editor/assets/images/insert-top-row.svg +1 -0
  212. package/src/editor/assets/images/merge-cancel-cell.svg +1 -0
  213. package/src/editor/assets/images/merge-cell.svg +1 -0
  214. package/src/editor/assets/images/original-size.svg +1 -0
  215. package/src/editor/assets/images/print.svg +1 -0
  216. package/src/editor/assets/images/rotate.svg +1 -0
  217. package/src/editor/assets/images/submenu-dropdown.svg +1 -0
  218. package/src/editor/assets/images/table-border-all.svg +1 -0
  219. package/src/editor/assets/images/table-border-dash.svg +1 -0
  220. package/src/editor/assets/images/table-border-empty.svg +1 -0
  221. package/src/editor/assets/images/table-border-external.svg +1 -0
  222. package/src/editor/assets/images/table-border-internal.svg +1 -0
  223. package/src/editor/assets/images/table-border-td-back.svg +1 -0
  224. package/src/editor/assets/images/table-border-td-bottom.svg +1 -0
  225. package/src/editor/assets/images/table-border-td-forward.svg +1 -0
  226. package/src/editor/assets/images/table-border-td-left.svg +1 -0
  227. package/src/editor/assets/images/table-border-td-right.svg +1 -0
  228. package/src/editor/assets/images/table-border-td-top.svg +1 -0
  229. package/src/editor/assets/images/table-border-td.svg +1 -0
  230. package/src/editor/assets/images/vertical-align-bottom.svg +1 -0
  231. package/src/editor/assets/images/vertical-align-middle.svg +1 -0
  232. package/src/editor/assets/images/vertical-align-top.svg +1 -0
  233. package/src/editor/assets/images/vertical-align.svg +1 -0
  234. package/src/editor/assets/images/zoom-in.svg +1 -0
  235. package/src/editor/assets/images/zoom-out.svg +1 -0
  236. package/src/editor/core/actuator/Actuator.ts +21 -0
  237. package/src/editor/core/actuator/handlers/positionContextChange.ts +13 -0
  238. package/src/editor/core/command/Command.ts +312 -0
  239. package/src/editor/core/command/CommandAdapt.ts +2733 -0
  240. package/src/editor/core/contextmenu/ContextMenu.ts +363 -0
  241. package/src/editor/core/contextmenu/menus/controlMenus.ts +25 -0
  242. package/src/editor/core/contextmenu/menus/globalMenus.ts +66 -0
  243. package/src/editor/core/contextmenu/menus/hyperlinkMenus.ts +58 -0
  244. package/src/editor/core/contextmenu/menus/imageMenus.ts +134 -0
  245. package/src/editor/core/contextmenu/menus/tableMenus.ts +331 -0
  246. package/src/editor/core/cursor/Cursor.ts +248 -0
  247. package/src/editor/core/cursor/CursorAgent.ts +75 -0
  248. package/src/editor/core/draw/Draw.ts +2934 -0
  249. package/src/editor/core/draw/control/Control.ts +1767 -0
  250. package/src/editor/core/draw/control/checkbox/CheckboxControl.ts +154 -0
  251. package/src/editor/core/draw/control/date/DateControl.ts +363 -0
  252. package/src/editor/core/draw/control/interactive/ControlSearch.ts +214 -0
  253. package/src/editor/core/draw/control/number/Calculator.ts +183 -0
  254. package/src/editor/core/draw/control/number/NumberControl.ts +183 -0
  255. package/src/editor/core/draw/control/radio/RadioControl.ts +68 -0
  256. package/src/editor/core/draw/control/richtext/Border.ts +52 -0
  257. package/src/editor/core/draw/control/select/SelectControl.ts +567 -0
  258. package/src/editor/core/draw/control/text/TextControl.ts +280 -0
  259. package/src/editor/core/draw/frame/Background.ts +117 -0
  260. package/src/editor/core/draw/frame/Badge.ts +88 -0
  261. package/src/editor/core/draw/frame/Footer.ts +155 -0
  262. package/src/editor/core/draw/frame/Header.ts +158 -0
  263. package/src/editor/core/draw/frame/LineNumber.ts +43 -0
  264. package/src/editor/core/draw/frame/Margin.ts +53 -0
  265. package/src/editor/core/draw/frame/PageBorder.ts +47 -0
  266. package/src/editor/core/draw/frame/PageNumber.ts +88 -0
  267. package/src/editor/core/draw/frame/Placeholder.ts +114 -0
  268. package/src/editor/core/draw/frame/Watermark.ts +188 -0
  269. package/src/editor/core/draw/graffiti/Graffiti.ts +125 -0
  270. package/src/editor/core/draw/interactive/Area.ts +312 -0
  271. package/src/editor/core/draw/interactive/Group.ts +198 -0
  272. package/src/editor/core/draw/interactive/Search.ts +527 -0
  273. package/src/editor/core/draw/particle/CheckboxParticle.ts +111 -0
  274. package/src/editor/core/draw/particle/HyperlinkParticle.ts +86 -0
  275. package/src/editor/core/draw/particle/ImageParticle.ts +280 -0
  276. package/src/editor/core/draw/particle/LabelParticle.ts +79 -0
  277. package/src/editor/core/draw/particle/LineBreakParticle.ts +55 -0
  278. package/src/editor/core/draw/particle/ListParticle.ts +255 -0
  279. package/src/editor/core/draw/particle/PageBreakParticle.ts +54 -0
  280. package/src/editor/core/draw/particle/RadioParticle.ts +99 -0
  281. package/src/editor/core/draw/particle/SeparatorParticle.ts +37 -0
  282. package/src/editor/core/draw/particle/SubscriptParticle.ts +23 -0
  283. package/src/editor/core/draw/particle/SuperscriptParticle.ts +23 -0
  284. package/src/editor/core/draw/particle/TextParticle.ts +174 -0
  285. package/src/editor/core/draw/particle/WhiteSpaceParticle.ts +32 -0
  286. package/src/editor/core/draw/particle/block/BlockParticle.ts +76 -0
  287. package/src/editor/core/draw/particle/block/modules/BaseBlock.ts +280 -0
  288. package/src/editor/core/draw/particle/block/modules/IFrameBlock.ts +47 -0
  289. package/src/editor/core/draw/particle/block/modules/VideoBlock.ts +61 -0
  290. package/src/editor/core/draw/particle/date/DateParticle.ts +111 -0
  291. package/src/editor/core/draw/particle/date/DatePicker.ts +577 -0
  292. package/src/editor/core/draw/particle/latex/LaTexParticle.ts +43 -0
  293. package/src/editor/core/draw/particle/latex/utils/LaTexUtils.ts +1196 -0
  294. package/src/editor/core/draw/particle/latex/utils/hershey.ts +1632 -0
  295. package/src/editor/core/draw/particle/latex/utils/symbols.ts +318 -0
  296. package/src/editor/core/draw/particle/previewer/Previewer.ts +582 -0
  297. package/src/editor/core/draw/particle/table/TableOperate.ts +988 -0
  298. package/src/editor/core/draw/particle/table/TableParticle.ts +558 -0
  299. package/src/editor/core/draw/particle/table/TableTool.ts +551 -0
  300. package/src/editor/core/draw/richtext/AbstractRichText.ts +59 -0
  301. package/src/editor/core/draw/richtext/Highlight.ts +24 -0
  302. package/src/editor/core/draw/richtext/Strikeout.ts +28 -0
  303. package/src/editor/core/draw/richtext/Underline.ts +106 -0
  304. package/src/editor/core/event/CanvasEvent.ts +215 -0
  305. package/src/editor/core/event/GlobalEvent.ts +173 -0
  306. package/src/editor/core/event/eventbus/EventBus.ts +50 -0
  307. package/src/editor/core/event/handlers/click.ts +234 -0
  308. package/src/editor/core/event/handlers/composition.ts +45 -0
  309. package/src/editor/core/event/handlers/copy.ts +72 -0
  310. package/src/editor/core/event/handlers/cut.ts +47 -0
  311. package/src/editor/core/event/handlers/drag.ts +66 -0
  312. package/src/editor/core/event/handlers/drop.ts +28 -0
  313. package/src/editor/core/event/handlers/input.ts +129 -0
  314. package/src/editor/core/event/handlers/keydown/backspace.ts +161 -0
  315. package/src/editor/core/event/handlers/keydown/delete.ts +119 -0
  316. package/src/editor/core/event/handlers/keydown/end.ts +69 -0
  317. package/src/editor/core/event/handlers/keydown/enter.ts +126 -0
  318. package/src/editor/core/event/handlers/keydown/home.ts +69 -0
  319. package/src/editor/core/event/handlers/keydown/index.ts +85 -0
  320. package/src/editor/core/event/handlers/keydown/left.ts +162 -0
  321. package/src/editor/core/event/handlers/keydown/right.ts +178 -0
  322. package/src/editor/core/event/handlers/keydown/tab.ts +41 -0
  323. package/src/editor/core/event/handlers/keydown/updown.ts +342 -0
  324. package/src/editor/core/event/handlers/mousedown.ts +262 -0
  325. package/src/editor/core/event/handlers/mouseleave.ts +14 -0
  326. package/src/editor/core/event/handlers/mousemove.ts +133 -0
  327. package/src/editor/core/event/handlers/mouseup.ts +341 -0
  328. package/src/editor/core/event/handlers/paste.ts +231 -0
  329. package/src/editor/core/history/HistoryManager.ts +61 -0
  330. package/src/editor/core/i18n/I18n.ts +51 -0
  331. package/src/editor/core/i18n/lang/en.json +92 -0
  332. package/src/editor/core/i18n/lang/zh-CN.json +92 -0
  333. package/src/editor/core/listener/Listener.ts +41 -0
  334. package/src/editor/core/observer/ImageObserver.ts +19 -0
  335. package/src/editor/core/observer/MouseObserver.ts +56 -0
  336. package/src/editor/core/observer/ScrollObserver.ts +88 -0
  337. package/src/editor/core/observer/SelectionObserver.ts +143 -0
  338. package/src/editor/core/override/Override.ts +14 -0
  339. package/src/editor/core/plugin/Plugin.ts +17 -0
  340. package/src/editor/core/position/Position.ts +870 -0
  341. package/src/editor/core/range/RangeManager.ts +723 -0
  342. package/src/editor/core/register/Register.ts +28 -0
  343. package/src/editor/core/shortcut/Shortcut.ts +80 -0
  344. package/src/editor/core/shortcut/keys/listKeys.ts +22 -0
  345. package/src/editor/core/shortcut/keys/richtextKeys.ts +102 -0
  346. package/src/editor/core/shortcut/keys/titleKeys.ts +62 -0
  347. package/src/editor/core/worker/WorkerManager.ts +96 -0
  348. package/src/editor/core/worker/works/catalog.ts +189 -0
  349. package/src/editor/core/worker/works/group.ts +34 -0
  350. package/src/editor/core/worker/works/value.ts +32 -0
  351. package/src/editor/core/worker/works/wordCount.ts +132 -0
  352. package/src/editor/core/zone/Zone.ts +183 -0
  353. package/src/editor/core/zone/ZoneTip.ts +108 -0
  354. package/src/editor/dataset/constant/Background.ts +10 -0
  355. package/src/editor/dataset/constant/Badge.ts +6 -0
  356. package/src/editor/dataset/constant/Checkbox.ts +12 -0
  357. package/src/editor/dataset/constant/Common.ts +44 -0
  358. package/src/editor/dataset/constant/ContextMenu.ts +61 -0
  359. package/src/editor/dataset/constant/Control.ts +14 -0
  360. package/src/editor/dataset/constant/Cursor.ts +11 -0
  361. package/src/editor/dataset/constant/Editor.ts +19 -0
  362. package/src/editor/dataset/constant/Element.ts +173 -0
  363. package/src/editor/dataset/constant/Footer.ts +10 -0
  364. package/src/editor/dataset/constant/Graffiti.ts +6 -0
  365. package/src/editor/dataset/constant/Group.ts +10 -0
  366. package/src/editor/dataset/constant/Header.ts +10 -0
  367. package/src/editor/dataset/constant/ImgCaption.ts +8 -0
  368. package/src/editor/dataset/constant/Label.ts +8 -0
  369. package/src/editor/dataset/constant/LineBreak.ts +7 -0
  370. package/src/editor/dataset/constant/LineNumber.ts +11 -0
  371. package/src/editor/dataset/constant/List.ts +26 -0
  372. package/src/editor/dataset/constant/PageBorder.ts +8 -0
  373. package/src/editor/dataset/constant/PageBreak.ts +7 -0
  374. package/src/editor/dataset/constant/PageNumber.ts +22 -0
  375. package/src/editor/dataset/constant/Placeholder.ts +9 -0
  376. package/src/editor/dataset/constant/Radio.ts +12 -0
  377. package/src/editor/dataset/constant/Regular.ts +23 -0
  378. package/src/editor/dataset/constant/Separator.ts +6 -0
  379. package/src/editor/dataset/constant/Shortcut.ts +3 -0
  380. package/src/editor/dataset/constant/Table.ts +9 -0
  381. package/src/editor/dataset/constant/Title.ts +38 -0
  382. package/src/editor/dataset/constant/Watermark.ts +17 -0
  383. package/src/editor/dataset/constant/WhiteSpace.ts +7 -0
  384. package/src/editor/dataset/constant/Zone.ts +5 -0
  385. package/src/editor/dataset/enum/Area.ts +5 -0
  386. package/src/editor/dataset/enum/Background.ts +11 -0
  387. package/src/editor/dataset/enum/Block.ts +4 -0
  388. package/src/editor/dataset/enum/Common.ts +30 -0
  389. package/src/editor/dataset/enum/Control.ts +39 -0
  390. package/src/editor/dataset/enum/Editor.ts +51 -0
  391. package/src/editor/dataset/enum/Element.ts +21 -0
  392. package/src/editor/dataset/enum/ElementStyle.ts +12 -0
  393. package/src/editor/dataset/enum/Event.ts +5 -0
  394. package/src/editor/dataset/enum/KeyMap.ts +85 -0
  395. package/src/editor/dataset/enum/LineNumber.ts +4 -0
  396. package/src/editor/dataset/enum/List.ts +23 -0
  397. package/src/editor/dataset/enum/Observer.ts +6 -0
  398. package/src/editor/dataset/enum/Row.ts +7 -0
  399. package/src/editor/dataset/enum/Text.ts +13 -0
  400. package/src/editor/dataset/enum/Title.ts +8 -0
  401. package/src/editor/dataset/enum/VerticalAlign.ts +5 -0
  402. package/src/editor/dataset/enum/Watermark.ts +4 -0
  403. package/src/editor/dataset/enum/table/Table.ts +19 -0
  404. package/src/editor/dataset/enum/table/TableTool.ts +4 -0
  405. package/src/editor/index.ts +241 -0
  406. package/src/editor/interface/Area.ts +68 -0
  407. package/src/editor/interface/Background.ts +9 -0
  408. package/src/editor/interface/Badge.ts +17 -0
  409. package/src/editor/interface/Block.ts +18 -0
  410. package/src/editor/interface/Catalog.ts +11 -0
  411. package/src/editor/interface/Checkbox.ts +17 -0
  412. package/src/editor/interface/Command.ts +3 -0
  413. package/src/editor/interface/Common.ts +43 -0
  414. package/src/editor/interface/Control.ts +250 -0
  415. package/src/editor/interface/Cursor.ts +7 -0
  416. package/src/editor/interface/Draw.ts +86 -0
  417. package/src/editor/interface/Editor.ts +172 -0
  418. package/src/editor/interface/Element.ts +273 -0
  419. package/src/editor/interface/Event.ts +27 -0
  420. package/src/editor/interface/EventBus.ts +46 -0
  421. package/src/editor/interface/Footer.ts +9 -0
  422. package/src/editor/interface/Graffiti.ts +15 -0
  423. package/src/editor/interface/Group.ts +8 -0
  424. package/src/editor/interface/Header.ts +9 -0
  425. package/src/editor/interface/Label.ts +8 -0
  426. package/src/editor/interface/LineBreak.ts +5 -0
  427. package/src/editor/interface/LineNumber.ts +10 -0
  428. package/src/editor/interface/Listener.ts +88 -0
  429. package/src/editor/interface/Margin.ts +1 -0
  430. package/src/editor/interface/PageBorder.ts +8 -0
  431. package/src/editor/interface/PageBreak.ts +5 -0
  432. package/src/editor/interface/PageNumber.ts +16 -0
  433. package/src/editor/interface/Placeholder.ts +7 -0
  434. package/src/editor/interface/Plugin.ts +8 -0
  435. package/src/editor/interface/Position.ts +113 -0
  436. package/src/editor/interface/Previewer.ts +15 -0
  437. package/src/editor/interface/Radio.ts +17 -0
  438. package/src/editor/interface/Range.ts +61 -0
  439. package/src/editor/interface/Row.ts +25 -0
  440. package/src/editor/interface/Search.ts +36 -0
  441. package/src/editor/interface/Separator.ts +4 -0
  442. package/src/editor/interface/Text.ts +15 -0
  443. package/src/editor/interface/Title.ts +32 -0
  444. package/src/editor/interface/Watermark.ts +16 -0
  445. package/src/editor/interface/WhiteSpace.ts +5 -0
  446. package/src/editor/interface/Zone.ts +3 -0
  447. package/src/editor/interface/contextmenu/ContextMenu.ts +76 -0
  448. package/src/editor/interface/i18n/I18n.ts +7 -0
  449. package/src/editor/interface/shortcut/Shortcut.ts +14 -0
  450. package/src/editor/interface/table/Colgroup.ts +4 -0
  451. package/src/editor/interface/table/Table.ts +9 -0
  452. package/src/editor/interface/table/Td.ts +36 -0
  453. package/src/editor/interface/table/Tr.ts +11 -0
  454. package/src/editor/types/index.d.ts +5 -0
  455. package/src/editor/utils/clipboard.ts +94 -0
  456. package/src/editor/utils/element.ts +1877 -0
  457. package/src/editor/utils/hotkey.ts +5 -0
  458. package/src/editor/utils/index.ts +445 -0
  459. package/src/editor/utils/option.ts +253 -0
  460. package/src/editor/utils/paragraph.ts +28 -0
  461. package/src/editor/utils/print.ts +99 -0
  462. package/src/editor/utils/ua.ts +13 -0
  463. package/src/main.ts +2053 -0
  464. package/src/mock.ts +611 -0
  465. package/src/plugins/copy/index.ts +30 -0
  466. package/src/plugins/markdown/index.ts +118 -0
  467. package/src/style.css +1079 -0
  468. package/src/utils/index.ts +45 -0
  469. package/src/utils/prism.ts +89 -0
  470. package/src/vite-env.d.ts +1 -0
  471. package/tsconfig.json +25 -0
  472. package/vite.config.ts +46 -0
@@ -0,0 +1,1167 @@
1
+ # Execute Command
2
+
3
+ ## How to Use
4
+
5
+ ```javascript
6
+ import Editor from "@hufe921/canvas-editor"
7
+
8
+ const instance = new Editor(container, <IElement[]>data, options)
9
+ instance.command.commandName()
10
+ ```
11
+
12
+ ::: tip
13
+ The execution of certain commands may cause the cursor to move out of the document (e.g., clicking the "Bold" button on the custom toolbar). In such cases, you can assign an identifier (EDITOR_COMPONENT) to the editor, allowing it to recognize the component as internal. For example:
14
+
15
+ ```js
16
+ import { EDITOR_COMPONENT, EditorComponent } from '@hufe921/canvas-editor'
17
+
18
+ <div class="menu" :[EDITOR_COMPONENT]="EditorComponent.MENU">
19
+ <button class="bold"></button>
20
+ </div>
21
+ ```
22
+ :::
23
+
24
+ ## executeMode
25
+
26
+ Feature: Switch editor mode (Edit, Clean, Read only)
27
+
28
+ Usage:
29
+
30
+ ```javascript
31
+ instance.command.executeMode(editorMode: EditorMode)
32
+ ```
33
+
34
+ ## executeCut
35
+
36
+ Feature: Cut
37
+
38
+ Usage:
39
+
40
+ ```javascript
41
+ instance.command.executeCut()
42
+ ```
43
+
44
+ ## executeCopy
45
+
46
+ Feature: Copy
47
+
48
+ Usage:
49
+
50
+ ```javascript
51
+ instance.command.executeCopy(payload?: ICopyOption)
52
+ ```
53
+
54
+ ## executePaste
55
+
56
+ Feature: Paste
57
+
58
+ Usage:
59
+
60
+ ```javascript
61
+ instance.command.executePaste(payload?: IPasteOption)
62
+ ```
63
+
64
+ ## executeSelectAll
65
+
66
+ Feature: Select all
67
+
68
+ Usage:
69
+
70
+ ```javascript
71
+ instance.command.executeSelectAll()
72
+ ```
73
+
74
+ ## executeBackspace
75
+
76
+ Feature: Forward delete
77
+
78
+ Usage:
79
+
80
+ ```javascript
81
+ instance.command.executeBackspace()
82
+ ```
83
+
84
+ ## executeSetRange
85
+
86
+ Feature: Set range
87
+
88
+ Usage:
89
+
90
+ ```javascript
91
+ instance.command.executeSetRange(
92
+ startIndex: number,
93
+ endIndex: number,
94
+ tableId?: string,
95
+ startTdIndex?: number,
96
+ endTdIndex?: number,
97
+ startTrIndex?: number,
98
+ endTrIndex?: number
99
+ )
100
+ ```
101
+
102
+ ## executeReplaceRange
103
+
104
+ Feature: Replace range
105
+
106
+ Usage:
107
+
108
+ ```javascript
109
+ instance.command.executeReplaceRange(range: IRange)
110
+ ```
111
+
112
+ ## executeSetPositionContext
113
+
114
+ Feature: Set position context
115
+
116
+ Usage:
117
+
118
+ ```javascript
119
+ instance.command.executeSetPositionContext(range: IRange)
120
+ ```
121
+
122
+ ## executeForceUpdate
123
+
124
+ Feature: force update editor
125
+
126
+ Usage:
127
+
128
+ ```javascript
129
+ instance.command.executeForceUpdate(options?: IForceUpdateOption)
130
+ ```
131
+
132
+ ## executeBlur
133
+
134
+ Feature: Set editor blur
135
+
136
+ Usage:
137
+
138
+ ```javascript
139
+ instance.command.executeBlur()
140
+ ```
141
+
142
+ ## executeHideCursor
143
+
144
+ Feature: Hide cursor (keep range)
145
+
146
+ Usage:
147
+
148
+ ```javascript
149
+ instance.command.executeHideCursor()
150
+ ```
151
+
152
+ ## executeUndo
153
+
154
+ Feature: Undo
155
+
156
+ Usage:
157
+
158
+ ```javascript
159
+ instance.command.executeUndo()
160
+ ```
161
+
162
+ ## executeRedo
163
+
164
+ Feature: Redo
165
+
166
+ Usage:
167
+
168
+ ```javascript
169
+ instance.command.executeRedo()
170
+ ```
171
+
172
+ ## executePainter
173
+
174
+ Feature: Format Brush - Copy style
175
+
176
+ Usage:
177
+
178
+ ```javascript
179
+ instance.command.executePainter()
180
+ ```
181
+
182
+ ## executeApplyPainterStyle
183
+
184
+ Feature: Format brush - Apply style
185
+
186
+ Usage:
187
+
188
+ ```javascript
189
+ instance.command.executeApplyPainterStyle()
190
+ ```
191
+
192
+ ## executeFormat
193
+
194
+ Feature: Clear format
195
+
196
+ Usage:
197
+
198
+ ```javascript
199
+ instance.command.executeFormat(options?: IRichtextOption)
200
+ ```
201
+
202
+ ## executeFont
203
+
204
+ Feature: Set font
205
+
206
+ Usage:
207
+
208
+ ```javascript
209
+ instance.command.executeFont(font: string, options?: IRichtextOption)
210
+ ```
211
+
212
+ ## executeSize
213
+
214
+ Feature: Set font size
215
+
216
+ Usage:
217
+
218
+ ```javascript
219
+ instance.command.executeSize(size: number, options?: IRichtextOption)
220
+ ```
221
+
222
+ ## executeSizeAdd
223
+
224
+ Feature: Increase the font size
225
+
226
+ Usage:
227
+
228
+ ```javascript
229
+ instance.command.executeSizeAdd(options?: IRichtextOption)
230
+ ```
231
+
232
+ ## executeSizeMinus
233
+
234
+ Feature: Reduce the font size
235
+
236
+ Usage:
237
+
238
+ ```javascript
239
+ instance.command.executeSizeMinus(options?: IRichtextOption)
240
+ ```
241
+
242
+ ## executeBold
243
+
244
+ Feature: Bold
245
+
246
+ Usage:
247
+
248
+ ```javascript
249
+ instance.command.executeBold(options?: IRichtextOption)
250
+ ```
251
+
252
+ ## executeItalic
253
+
254
+ Feature: Italic
255
+
256
+ Usage:
257
+
258
+ ```javascript
259
+ instance.command.executeItalic(options?: IRichtextOption)
260
+ ```
261
+
262
+ ## executeUnderline
263
+
264
+ Feature: Underline
265
+
266
+ Usage:
267
+
268
+ ```javascript
269
+ instance.command.executeUnderline(textDecoration?: ITextDecoration, options?: IRichtextOption)
270
+ ```
271
+
272
+ ## executeStrikeout
273
+
274
+ Feature: Strikeout
275
+
276
+ Usage:
277
+
278
+ ```javascript
279
+ instance.command.executeStrikeout(options?: IRichtextOption)
280
+ ```
281
+
282
+ ## executeSuperscript
283
+
284
+ Feature: Superscript
285
+
286
+ Usage:
287
+
288
+ ```javascript
289
+ instance.command.executeSuperscript(options?: IRichtextOption)
290
+ ```
291
+
292
+ ## executeSubscript
293
+
294
+ Feature: Subscript
295
+
296
+ Usage:
297
+
298
+ ```javascript
299
+ instance.command.executeSubscript(options?: IRichtextOption)
300
+ ```
301
+
302
+ ## executeColor
303
+
304
+ Feature: Font color
305
+
306
+ Usage:
307
+
308
+ ```javascript
309
+ instance.command.executeColor(color: string | null, options?: IRichtextOption)
310
+ ```
311
+
312
+ ## executeHighlight
313
+
314
+ Feature: Highlight
315
+
316
+ Usage:
317
+
318
+ ```javascript
319
+ instance.command.executeHighlight(color: string | null, options?: IRichtextOption)
320
+ ```
321
+
322
+ ## executeTitle
323
+
324
+ Feature: Set title
325
+
326
+ Usage:
327
+
328
+ ```javascript
329
+ instance.command.executeTitle(TitleLevel | null)
330
+ ```
331
+
332
+ ## executeList
333
+
334
+ Feature: Set list
335
+
336
+ Usage:
337
+
338
+ ```javascript
339
+ instance.command.executeList(listType: ListType | null, listStyle?: ListStyle)
340
+ ```
341
+
342
+ ## executeRowFlex
343
+
344
+ Feature: Line alignment
345
+
346
+ Usage:
347
+
348
+ ```javascript
349
+ instance.command.executeRowFlex(rowFlex: RowFlex)
350
+ ```
351
+
352
+ ## executeRowMargin
353
+
354
+ Feature: Line spacing
355
+
356
+ Usage:
357
+
358
+ ```javascript
359
+ instance.command.executeRowMargin(rowMargin: number)
360
+ ```
361
+
362
+ ## executeInsertTable
363
+
364
+ Feature: Insert table
365
+
366
+ Usage:
367
+
368
+ ```javascript
369
+ instance.command.executeInsertTable(row: number, col: number)
370
+ ```
371
+
372
+ ## executeInsertTableTopRow
373
+
374
+ Feature: Insert a row up
375
+
376
+ Usage:
377
+
378
+ ```javascript
379
+ instance.command.executeInsertTableTopRow()
380
+ ```
381
+
382
+ ## executeInsertTableBottomRow
383
+
384
+ Feature: Insert a row down
385
+
386
+ Usage:
387
+
388
+ ```javascript
389
+ instance.command.executeInsertTableBottomRow()
390
+ ```
391
+
392
+ ## executeInsertTableLeftCol
393
+
394
+ Feature: Insert a column to the left
395
+
396
+ Usage:
397
+
398
+ ```javascript
399
+ instance.command.executeInsertTableLeftCol()
400
+ ```
401
+
402
+ ## executeInsertTableRightCol
403
+
404
+ Feature: Insert a column to the right
405
+
406
+ Usage:
407
+
408
+ ```javascript
409
+ instance.command.executeInsertTableRightCol()
410
+ ```
411
+
412
+ ## executeDeleteTableRow
413
+
414
+ Feature: Deletes the current row
415
+
416
+ Usage:
417
+
418
+ ```javascript
419
+ instance.command.executeDeleteTableRow()
420
+ ```
421
+
422
+ ## executeDeleteTableCol
423
+
424
+ Feature: Delete the current column
425
+
426
+ Usage:
427
+
428
+ ```javascript
429
+ instance.command.executeDeleteTableCol()
430
+ ```
431
+
432
+ ## executeDeleteTable
433
+
434
+ Feature: Delete the table
435
+
436
+ Usage:
437
+
438
+ ```javascript
439
+ instance.command.executeDeleteTable()
440
+ ```
441
+
442
+ ## executeMergeTableCell
443
+
444
+ Feature: Merge tables
445
+
446
+ Usage:
447
+
448
+ ```javascript
449
+ instance.command.executeMergeTableCell()
450
+ ```
451
+
452
+ ## executeCancelMergeTableCell
453
+
454
+ Feature: Cancel the merge form
455
+
456
+ Usage:
457
+
458
+ ```javascript
459
+ instance.command.executeCancelMergeTableCell()
460
+ ```
461
+
462
+ ## executeSplitVerticalTableCell
463
+
464
+ Feature: Split table cell (vertical)
465
+
466
+ Usage:
467
+
468
+ ```javascript
469
+ instance.command.executeSplitVerticalTableCell()
470
+ ```
471
+
472
+ ## executeSplitHorizontalTableCell
473
+
474
+ Feature: Split table cell (horizontal)
475
+
476
+ Usage:
477
+
478
+ ```javascript
479
+ instance.command.executeSplitHorizontalTableCell()
480
+ ```
481
+
482
+ ## executeTableTdVerticalAlign
483
+
484
+ Feature: Table cell vertical alignment
485
+
486
+ Usage:
487
+
488
+ ```javascript
489
+ instance.command.executeTableTdVerticalAlign(payload: VerticalAlign)
490
+ ```
491
+
492
+ ## executeTableBorderType
493
+
494
+ Feature: Table border type
495
+
496
+ Usage:
497
+
498
+ ```javascript
499
+ instance.command.executeTableBorderType(payload: TableBorder)
500
+ ```
501
+
502
+ ## executeTableBorderColor
503
+
504
+ Feature: Table border color
505
+
506
+ Usage:
507
+
508
+ ```javascript
509
+ instance.command.executeTableBorderColor(payload: string)
510
+ ```
511
+
512
+ ## executeTableTdBorderType
513
+
514
+ Feature: Table td border type
515
+
516
+ Usage:
517
+
518
+ ```javascript
519
+ instance.command.executeTableTdBorderType(payload: TdBorder)
520
+ ```
521
+
522
+ ## executeTableTdSlashType
523
+
524
+ Feature: Table td slash type
525
+
526
+ Usage:
527
+
528
+ ```javascript
529
+ instance.command.executeTableTdSlashType(payload: TdSlash)
530
+ ```
531
+
532
+ ## executeTableTdBackgroundColor
533
+
534
+ Feature: Table cell background color
535
+
536
+ Usage:
537
+
538
+ ```javascript
539
+ instance.command.executeTableTdBackgroundColor(payload: string)
540
+ ```
541
+
542
+ ## executeTableSelectAll
543
+
544
+ Feature: Select the entire table
545
+
546
+ Usage:
547
+
548
+ ```javascript
549
+ instance.command.executeTableSelectAll()
550
+ ```
551
+
552
+ ## executeImage
553
+
554
+ Feature: Insert a picture
555
+
556
+ Usage:
557
+
558
+ ```javascript
559
+ instance.command.executeImage({
560
+ id?: string;
561
+ width: number;
562
+ height: number;
563
+ value: string;
564
+ imgDisplay?: ImageDisplay;
565
+ })
566
+ ```
567
+
568
+ ## executeHyperlink
569
+
570
+ Feature: Insert a link
571
+
572
+ Usage:
573
+
574
+ ```javascript
575
+ instance.command.executeHyperlink({
576
+ type: ElementType.HYPERLINK,
577
+ value: string,
578
+ url: string,
579
+ valueList: IElement[]
580
+ })
581
+ ```
582
+
583
+ ## executeDeleteHyperlink
584
+
585
+ Feature: Delete the link
586
+
587
+ Usage:
588
+
589
+ ```javascript
590
+ instance.command.executeDeleteHyperlink()
591
+ ```
592
+
593
+ ## executeCancelHyperlink
594
+
595
+ Feature: Unlink
596
+
597
+ Usage:
598
+
599
+ ```javascript
600
+ instance.command.executeCancelHyperlink()
601
+ ```
602
+
603
+ ## executeEditHyperlink
604
+
605
+ Feature: Edit the link
606
+
607
+ Usage:
608
+
609
+ ```javascript
610
+ instance.command.executeEditHyperlink(newUrl: string)
611
+ ```
612
+
613
+ ## executeSeparator
614
+
615
+ Feature: Insert a dividing line
616
+
617
+ Usage:
618
+
619
+ ```javascript
620
+ instance.command.executeSeparator(dashArray: number[], option?: { lineWidth?: number; color?: string })
621
+ ```
622
+
623
+ ## executePageBreak
624
+
625
+ Feature: Page breaks
626
+
627
+ Usage:
628
+
629
+ ```javascript
630
+ instance.command.executePageBreak()
631
+ ```
632
+
633
+ ## executeAddWatermark
634
+
635
+ Feature: Add a watermark
636
+
637
+ Usage:
638
+
639
+ ```javascript
640
+ instance.command.executeAddWatermark({
641
+ data: string;
642
+ color?: string;
643
+ opacity?: number;
644
+ size?: number;
645
+ font?: string;
646
+ })
647
+ ```
648
+
649
+ ## executeDeleteWatermark
650
+
651
+ Feature: Remove the watermark
652
+
653
+ Usage:
654
+
655
+ ```javascript
656
+ instance.command.executeDeleteWatermark()
657
+ ```
658
+
659
+ ## executeSearch
660
+
661
+ Feature: 搜索
662
+
663
+ Usage:
664
+
665
+ ```javascript
666
+ instance.command.executeSearch(keyword: string, options?: ISearchOption)
667
+ ```
668
+
669
+ ## executeSearchNavigatePre
670
+
671
+ Feature: Search Navigation - Previous
672
+
673
+ Usage:
674
+
675
+ ```javascript
676
+ instance.command.executeSearchNavigatePre()
677
+ ```
678
+
679
+ ## executeSearchNavigateNext
680
+
681
+ Feature: Search Navigation - Next
682
+
683
+ Usage:
684
+
685
+ ```javascript
686
+ instance.command.executeSearchNavigateNext()
687
+ ```
688
+
689
+ ## executeReplace
690
+
691
+ Feature: Search for replacement
692
+
693
+ Usage:
694
+
695
+ ```javascript
696
+ instance.command.executeReplace(newWord: string, option?: IReplaceOption)
697
+ ```
698
+
699
+ ## executePrint
700
+
701
+ Feature: Print
702
+
703
+ Usage:
704
+
705
+ ```javascript
706
+ instance.command.executePrint()
707
+ ```
708
+
709
+ ## executeReplaceImageElement
710
+
711
+ Feature: Replace the picture
712
+
713
+ Usage:
714
+
715
+ ```javascript
716
+ instance.command.executeReplaceImageElement(newUrl: string)
717
+ ```
718
+
719
+ ## executeSaveAsImageElement
720
+
721
+ Feature: Save as picture
722
+
723
+ Usage:
724
+
725
+ ```javascript
726
+ instance.command.executeSaveAsImageElement()
727
+ ```
728
+
729
+ ## executeChangeImageDisplay
730
+
731
+ Feature: Change how image rows are displayed
732
+
733
+ Usage:
734
+
735
+ ```javascript
736
+ instance.command.executeChangeImageDisplay(element: IElement, display: ImageDisplay)
737
+ ```
738
+
739
+ ## executeSetImageCrop
740
+
741
+ Feature: Set image crop information
742
+
743
+ Usage:
744
+
745
+ ```javascript
746
+ instance.command.executeSetImageCrop(crop: IImageCrop)
747
+ ```
748
+
749
+ ## executePageMode
750
+
751
+ Feature: Page mode
752
+
753
+ Usage:
754
+
755
+ ```javascript
756
+ instance.command.executePageMode(pageMode: PageMode)
757
+ ```
758
+
759
+ ## executePageScale
760
+
761
+ Feature: Set page scale
762
+
763
+ Usage:
764
+
765
+ ```javascript
766
+ instance.command.executePageScale(scale: number)
767
+ ```
768
+
769
+ ## executePageScaleRecovery
770
+
771
+ Feature: Restore the original zoom factor of the page
772
+
773
+ Usage:
774
+
775
+ ```javascript
776
+ instance.command.executePageScaleRecovery()
777
+ ```
778
+
779
+ ## executePageScaleMinus
780
+
781
+ Feature: Page zoom out
782
+
783
+ Usage:
784
+
785
+ ```javascript
786
+ instance.command.executePageScaleMinus()
787
+ ```
788
+
789
+ ## executePageScaleAdd
790
+
791
+ Feature: Page zoom in
792
+
793
+ Usage:
794
+
795
+ ```javascript
796
+ instance.command.executePageScaleAdd()
797
+ ```
798
+
799
+ ## executePaperSize
800
+
801
+ Feature: Set the paper size
802
+
803
+ Usage:
804
+
805
+ ```javascript
806
+ instance.command.executePaperSize(width: number, height: number)
807
+ ```
808
+
809
+ ## executePaperDirection
810
+
811
+ Feature: Set the paper orientation
812
+
813
+ Usage:
814
+
815
+ ```javascript
816
+ instance.command.executePaperDirection(paperDirection: PaperDirection)
817
+ ```
818
+
819
+ ## executeSetPaperMargin
820
+
821
+ Feature: Set the paper margins
822
+
823
+ Usage:
824
+
825
+ ```javascript
826
+ instance.command.executeSetPaperMargin([top: number, right: number, bottom: number, left: number])
827
+ ```
828
+
829
+ ## executeSetMainBadge
830
+
831
+ Feature: Set main badge
832
+
833
+ Usage:
834
+
835
+ ```javascript
836
+ instance.command.executeSetMainBadge(payload: IBadge | null)
837
+ ```
838
+
839
+ ## executeSetAreaBadge
840
+
841
+ Feature: Set area badge
842
+
843
+ Usage:
844
+
845
+ ```javascript
846
+ instance.command.executeSetAreaBadge(payload: IAreaBadge[])
847
+ ```
848
+
849
+ ## executeInsertElementList
850
+
851
+ Feature: Insert an element
852
+
853
+ Usage:
854
+
855
+ ```javascript
856
+ instance.command.executeInsertElementList(elementList: IElement[], options?: IInsertElementListOption)
857
+ ```
858
+
859
+ ## executeAppendElementList
860
+
861
+ Feature: Append elements
862
+
863
+ Usage:
864
+
865
+ ```javascript
866
+ instance.command.executeAppendElementList(elementList: IElement[], options?: IAppendElementListOption)
867
+ ```
868
+
869
+ ## executeUpdateElementById
870
+
871
+ Feature: Update element by id
872
+
873
+ Usage:
874
+
875
+ ```javascript
876
+ instance.command.executeUpdateElementById(payload: IUpdateElementByIdOption)
877
+ ```
878
+
879
+ ## executeDeleteElementById
880
+
881
+ Feature: Delete element by id
882
+
883
+ Usage:
884
+
885
+ ```javascript
886
+ instance.command.executeDeleteElementById(payload: IDeleteElementByIdOption)
887
+ ```
888
+
889
+ ## executeSetValue
890
+
891
+ Feature: Set the editor data
892
+
893
+ Usage:
894
+
895
+ ```javascript
896
+ instance.command.executeSetValue(payload: Partial<IEditorData>, options?: ISetValueOption)
897
+ ```
898
+
899
+ ## executeRemoveControl
900
+
901
+ Feature: Delete the control
902
+
903
+ Usage:
904
+
905
+ ```javascript
906
+ instance.command.executeRemoveControl(payload?: IRemoveControlOption)
907
+ ```
908
+
909
+ ## executeSetLocale
910
+
911
+ Feature: Set local language
912
+
913
+ Usage:
914
+
915
+ ```javascript
916
+ instance.command.executeSetLocale(locale: string)
917
+ ```
918
+
919
+ ## executeLocationCatalog
920
+
921
+ Feature: Locate directory location
922
+
923
+ Usage:
924
+
925
+ ```javascript
926
+ instance.command.executeLocationCatalog(titleId: string)
927
+ ```
928
+
929
+ ## executeWordTool
930
+
931
+ Feature: Word Tool (Delete blank lines and leading Spaces)
932
+
933
+ Usage:
934
+
935
+ ```javascript
936
+ instance.command.executeWordTool()
937
+ ```
938
+
939
+ ## executeSetHTML
940
+
941
+ Feature: Set the editor HTML data
942
+
943
+ Usage:
944
+
945
+ ```javascript
946
+ instance.command.executeSetHTML(payload: Partial<IEditorHTML)
947
+ ```
948
+
949
+ ## executeSetGroup
950
+
951
+ Feature: Set group
952
+
953
+ Usage:
954
+
955
+ ```javascript
956
+ instance.command.executeSetGroup()
957
+ ```
958
+
959
+ ## executeDeleteGroup
960
+
961
+ Feature: Delete group
962
+
963
+ Usage:
964
+
965
+ ```javascript
966
+ instance.command.executeDeleteGroup(groupId: string)
967
+ ```
968
+
969
+ ## executeLocationGroup
970
+
971
+ Feature: Positioning group position
972
+
973
+ Usage:
974
+
975
+ ```javascript
976
+ instance.command.executeLocationGroup(groupId: string)
977
+ ```
978
+
979
+ ## executeSetZone
980
+
981
+ Feature: Set active zone (header, main, footer)
982
+
983
+ Usage:
984
+
985
+ ```javascript
986
+ instance.command.executeSetZone(zone: EditorZone)
987
+ ```
988
+
989
+ ## executeSetControlValue
990
+
991
+ Feature: Set control value
992
+
993
+ Usage:
994
+
995
+ ```javascript
996
+ instance.command.executeSetControlValue(payload: ISetControlValueOption)
997
+ ```
998
+
999
+ ## executeSetControlValueList
1000
+
1001
+ Feature: Batch set control value
1002
+
1003
+ Usage:
1004
+
1005
+ ```javascript
1006
+ instance.command.executeSetControlValueList(payload: ISetControlValueOption[])
1007
+ ```
1008
+
1009
+ ## executeSetControlExtension
1010
+
1011
+ Feature: Set control extension value
1012
+
1013
+ Usage:
1014
+
1015
+ ```javascript
1016
+ instance.command.executeSetControlExtension(payload: ISetControlExtensionOption)
1017
+ ```
1018
+
1019
+ ## executeSetControlExtensionList
1020
+
1021
+ Feature: Batch set control extension value
1022
+
1023
+ Usage:
1024
+
1025
+ ```javascript
1026
+ instance.command.executeSetControlExtensionList(payload: ISetControlExtensionOption[])
1027
+ ```
1028
+
1029
+ ## executeSetControlProperties
1030
+
1031
+ Feature: Set control properties
1032
+
1033
+ Usage:
1034
+
1035
+ ```javascript
1036
+ instance.command.executeSetControlProperties(payload: ISetControlProperties)
1037
+ ```
1038
+
1039
+ ## executeSetControlPropertiesList
1040
+
1041
+ Feature: Batch set control properties
1042
+
1043
+ Usage:
1044
+
1045
+ ```javascript
1046
+ instance.command.executeSetControlPropertiesList(payload: ISetControlProperties[])
1047
+ ```
1048
+
1049
+ ## executeSetControlHighlight
1050
+
1051
+ Feature: Set control highlight (by keyword)
1052
+
1053
+ Usage:
1054
+
1055
+ ```javascript
1056
+ instance.command.executeSetControlHighlight(payload: ISetControlHighlightOption)
1057
+ ```
1058
+
1059
+ ## executeLocationControl
1060
+
1061
+ Feature: Positioning and activating control
1062
+
1063
+ Usage:
1064
+
1065
+ ```javascript
1066
+ instance.command.executeLocationControl(controlId: string, options?: ILocationControlOption)
1067
+ ```
1068
+
1069
+ ## executeInsertControl
1070
+
1071
+ Feature: Insert control
1072
+
1073
+ Usage:
1074
+
1075
+ ```javascript
1076
+ instance.command.executeInsertControl(payload: IElement)
1077
+ ```
1078
+
1079
+ ## executeJumpControl
1080
+
1081
+ Feature: Jump to the next/previous control
1082
+
1083
+ Usage:
1084
+
1085
+ ```javascript
1086
+ instance.command.executeJumpControl(payload?: { direction?: MoveDirection })
1087
+ ```
1088
+
1089
+ ## executeUpdateOptions
1090
+
1091
+ Feature: Update options
1092
+
1093
+ Usage:
1094
+
1095
+ ```javascript
1096
+ instance.command.executeUpdateOptions(payload: IUpdateOption)
1097
+ ```
1098
+
1099
+ ## executeInsertTitle
1100
+
1101
+ Feature: Insert title
1102
+
1103
+ Usage:
1104
+
1105
+ ```javascript
1106
+ instance.command.executeInsertTitle(payload: IElement)
1107
+ ```
1108
+
1109
+ ## executeFocus
1110
+
1111
+ Feature: focus
1112
+
1113
+ Usage:
1114
+
1115
+ ```javascript
1116
+ instance.command.executeFocus(payload?: IFocusOption)
1117
+ ```
1118
+
1119
+ ## executeInsertArea
1120
+
1121
+ Feature: insert area element
1122
+
1123
+ Usage:
1124
+
1125
+ ```javascript
1126
+ const areaId = instance.command.executeInsertArea(payload: IInsertAreaOption)
1127
+ ```
1128
+
1129
+ ## executeSetAreaProperties
1130
+
1131
+ Feature: set area properties
1132
+
1133
+ Usage:
1134
+
1135
+ ```javascript
1136
+ instance.command.executeSetAreaProperties(payload: ISetAreaPropertiesOption)
1137
+ ```
1138
+
1139
+ ## executeSetAreaValue
1140
+
1141
+ Feature: set area value
1142
+
1143
+ Usage:
1144
+
1145
+ ```javascript
1146
+ instance.command.executeSetAreaValue(payload: ISetAreaValueOption)
1147
+ ```
1148
+
1149
+ ## executeLocationArea
1150
+
1151
+ Feature: positioning area position
1152
+
1153
+ Usage:
1154
+
1155
+ ```javascript
1156
+ instance.command.executeLocationArea(areaId: string, options?: ILocationAreaOption)
1157
+ ```
1158
+
1159
+ ## executeClearGraffiti
1160
+
1161
+ Feature: clear graffiti data
1162
+
1163
+ Usage:
1164
+
1165
+ ```javascript
1166
+ instance.command.executeClearGraffiti()
1167
+ ```