@wangeditor-next/plugin-float-image 0.1.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 (418) hide show
  1. package/dist/basic-modules/src/constants/icon-svg.d.ts +47 -0
  2. package/dist/basic-modules/src/index.d.ts +9 -0
  3. package/dist/basic-modules/src/locale/en.d.ts +101 -0
  4. package/dist/basic-modules/src/locale/index.d.ts +5 -0
  5. package/dist/basic-modules/src/locale/zh-CN.d.ts +101 -0
  6. package/dist/basic-modules/src/modules/blockquote/custom-types.d.ts +9 -0
  7. package/dist/basic-modules/src/modules/blockquote/elem-to-html.d.ts +11 -0
  8. package/dist/basic-modules/src/modules/blockquote/index.d.ts +7 -0
  9. package/dist/basic-modules/src/modules/blockquote/menu/BlockquoteMenu.d.ts +20 -0
  10. package/dist/basic-modules/src/modules/blockquote/menu/index.d.ts +9 -0
  11. package/dist/basic-modules/src/modules/blockquote/parse-elem-html.d.ts +14 -0
  12. package/dist/basic-modules/src/modules/blockquote/plugin.d.ts +7 -0
  13. package/dist/basic-modules/src/modules/blockquote/render-elem.d.ts +20 -0
  14. package/dist/basic-modules/src/modules/code-block/custom-types.d.ts +17 -0
  15. package/dist/basic-modules/src/modules/code-block/elem-to-html.d.ts +16 -0
  16. package/dist/basic-modules/src/modules/code-block/index.d.ts +7 -0
  17. package/dist/basic-modules/src/modules/code-block/menu/CodeBlockMenu.d.ts +22 -0
  18. package/dist/basic-modules/src/modules/code-block/menu/index.d.ts +9 -0
  19. package/dist/basic-modules/src/modules/code-block/parse-elem-html.d.ts +19 -0
  20. package/dist/basic-modules/src/modules/code-block/plugin.d.ts +7 -0
  21. package/dist/basic-modules/src/modules/code-block/pre-parse-html.d.ts +15 -0
  22. package/dist/basic-modules/src/modules/code-block/render-elem.d.ts +18 -0
  23. package/dist/basic-modules/src/modules/color/custom-types.d.ts +9 -0
  24. package/dist/basic-modules/src/modules/color/index.d.ts +7 -0
  25. package/dist/basic-modules/src/modules/color/menu/BaseMenu.d.ts +20 -0
  26. package/dist/basic-modules/src/modules/color/menu/BgColorMenu.d.ts +11 -0
  27. package/dist/basic-modules/src/modules/color/menu/ColorMenu.d.ts +11 -0
  28. package/dist/basic-modules/src/modules/color/menu/config.d.ts +6 -0
  29. package/dist/basic-modules/src/modules/color/menu/index.d.ts +20 -0
  30. package/dist/basic-modules/src/modules/color/parse-style-html.d.ts +8 -0
  31. package/dist/basic-modules/src/modules/color/pre-parse-html.d.ts +15 -0
  32. package/dist/basic-modules/src/modules/color/render-style.d.ts +13 -0
  33. package/dist/basic-modules/src/modules/color/style-to-html.d.ts +12 -0
  34. package/dist/basic-modules/src/modules/common/index.d.ts +7 -0
  35. package/dist/basic-modules/src/modules/common/menu/EnterMenu.d.ts +15 -0
  36. package/dist/basic-modules/src/modules/common/menu/index.d.ts +9 -0
  37. package/dist/basic-modules/src/modules/divider/custom-types.d.ts +12 -0
  38. package/dist/basic-modules/src/modules/divider/elem-to-html.d.ts +11 -0
  39. package/dist/basic-modules/src/modules/divider/index.d.ts +7 -0
  40. package/dist/basic-modules/src/modules/divider/menu/InsertDividerMenu.d.ts +15 -0
  41. package/dist/basic-modules/src/modules/divider/menu/index.d.ts +9 -0
  42. package/dist/basic-modules/src/modules/divider/parse-elem-html.d.ts +14 -0
  43. package/dist/basic-modules/src/modules/divider/plugin.d.ts +7 -0
  44. package/dist/basic-modules/src/modules/divider/render-elem.d.ts +13 -0
  45. package/dist/basic-modules/src/modules/emotion/index.d.ts +7 -0
  46. package/dist/basic-modules/src/modules/emotion/menu/EmotionMenu.d.ts +19 -0
  47. package/dist/basic-modules/src/modules/emotion/menu/config.d.ts +5 -0
  48. package/dist/basic-modules/src/modules/emotion/menu/index.d.ts +12 -0
  49. package/dist/basic-modules/src/modules/font-size-family/custom-types.d.ts +9 -0
  50. package/dist/basic-modules/src/modules/font-size-family/index.d.ts +7 -0
  51. package/dist/basic-modules/src/modules/font-size-family/menu/BaseMenu.d.ts +18 -0
  52. package/dist/basic-modules/src/modules/font-size-family/menu/FontFamilyMenu.d.ts +14 -0
  53. package/dist/basic-modules/src/modules/font-size-family/menu/FontSizeMenu.d.ts +13 -0
  54. package/dist/basic-modules/src/modules/font-size-family/menu/config.d.ts +12 -0
  55. package/dist/basic-modules/src/modules/font-size-family/menu/index.d.ts +26 -0
  56. package/dist/basic-modules/src/modules/font-size-family/parse-style-html.d.ts +8 -0
  57. package/dist/basic-modules/src/modules/font-size-family/pre-parse-html.d.ts +15 -0
  58. package/dist/basic-modules/src/modules/font-size-family/render-style.d.ts +13 -0
  59. package/dist/basic-modules/src/modules/font-size-family/style-to-html.d.ts +12 -0
  60. package/dist/basic-modules/src/modules/format-painter/helper.d.ts +3 -0
  61. package/dist/basic-modules/src/modules/format-painter/index.d.ts +7 -0
  62. package/dist/basic-modules/src/modules/format-painter/menu/FormatPainter.d.ts +22 -0
  63. package/dist/basic-modules/src/modules/format-painter/menu/index.d.ts +9 -0
  64. package/dist/basic-modules/src/modules/format-painter/plugin.d.ts +7 -0
  65. package/dist/basic-modules/src/modules/full-screen/index.d.ts +7 -0
  66. package/dist/basic-modules/src/modules/full-screen/menu/FullScreen.d.ts +18 -0
  67. package/dist/basic-modules/src/modules/full-screen/menu/index.d.ts +9 -0
  68. package/dist/basic-modules/src/modules/header/custom-types.d.ts +29 -0
  69. package/dist/basic-modules/src/modules/header/elem-to-html.d.ts +29 -0
  70. package/dist/basic-modules/src/modules/header/helper.d.ts +14 -0
  71. package/dist/basic-modules/src/modules/header/index.d.ts +7 -0
  72. package/dist/basic-modules/src/modules/header/menu/Header1ButtonMenu.d.ts +10 -0
  73. package/dist/basic-modules/src/modules/header/menu/Header2ButtonMenu.d.ts +10 -0
  74. package/dist/basic-modules/src/modules/header/menu/Header3ButtonMenu.d.ts +10 -0
  75. package/dist/basic-modules/src/modules/header/menu/Header4ButtonMenu.d.ts +10 -0
  76. package/dist/basic-modules/src/modules/header/menu/Header5ButtonMenu.d.ts +10 -0
  77. package/dist/basic-modules/src/modules/header/menu/Header6ButtonMenu.d.ts +10 -0
  78. package/dist/basic-modules/src/modules/header/menu/HeaderButtonMenuBase.d.ts +19 -0
  79. package/dist/basic-modules/src/modules/header/menu/HeaderSelectMenu.d.ts +26 -0
  80. package/dist/basic-modules/src/modules/header/menu/index.d.ts +39 -0
  81. package/dist/basic-modules/src/modules/header/parse-elem-html.d.ts +32 -0
  82. package/dist/basic-modules/src/modules/header/plugin.d.ts +7 -0
  83. package/dist/basic-modules/src/modules/header/render-elem.d.ts +32 -0
  84. package/dist/basic-modules/src/modules/image/custom-types.d.ts +22 -0
  85. package/dist/basic-modules/src/modules/image/elem-to-html.d.ts +11 -0
  86. package/dist/basic-modules/src/modules/image/helper.d.ts +13 -0
  87. package/dist/basic-modules/src/modules/image/index.d.ts +7 -0
  88. package/dist/basic-modules/src/modules/image/menu/DeleteImage.d.ts +15 -0
  89. package/dist/basic-modules/src/modules/image/menu/EditImage.d.ts +28 -0
  90. package/dist/basic-modules/src/modules/image/menu/EditImageSizeMenu.d.ts +25 -0
  91. package/dist/basic-modules/src/modules/image/menu/InsertImage.d.ts +27 -0
  92. package/dist/basic-modules/src/modules/image/menu/ViewImageLink.d.ts +15 -0
  93. package/dist/basic-modules/src/modules/image/menu/Width100.d.ts +10 -0
  94. package/dist/basic-modules/src/modules/image/menu/Width30.d.ts +10 -0
  95. package/dist/basic-modules/src/modules/image/menu/Width50.d.ts +10 -0
  96. package/dist/basic-modules/src/modules/image/menu/WidthBase.d.ts +16 -0
  97. package/dist/basic-modules/src/modules/image/menu/config.d.ts +30 -0
  98. package/dist/basic-modules/src/modules/image/menu/index.d.ts +56 -0
  99. package/dist/basic-modules/src/modules/image/parse-elem-html.d.ts +14 -0
  100. package/dist/basic-modules/src/modules/image/plugin.d.ts +7 -0
  101. package/dist/basic-modules/src/modules/image/render-elem.d.ts +13 -0
  102. package/dist/basic-modules/src/modules/indent/custom-types.d.ts +10 -0
  103. package/dist/basic-modules/src/modules/indent/index.d.ts +7 -0
  104. package/dist/basic-modules/src/modules/indent/menu/BaseMenu.d.ts +25 -0
  105. package/dist/basic-modules/src/modules/indent/menu/DecreaseIndentMenu.d.ts +13 -0
  106. package/dist/basic-modules/src/modules/indent/menu/IncreaseIndentMenu.d.ts +15 -0
  107. package/dist/basic-modules/src/modules/indent/menu/index.d.ts +14 -0
  108. package/dist/basic-modules/src/modules/indent/parse-style-html.d.ts +8 -0
  109. package/dist/basic-modules/src/modules/indent/pre-parse-html.d.ts +15 -0
  110. package/dist/basic-modules/src/modules/indent/render-style.d.ts +13 -0
  111. package/dist/basic-modules/src/modules/indent/style-to-html.d.ts +6 -0
  112. package/dist/basic-modules/src/modules/justify/custom-types.d.ts +10 -0
  113. package/dist/basic-modules/src/modules/justify/index.d.ts +7 -0
  114. package/dist/basic-modules/src/modules/justify/menu/BaseMenu.d.ts +15 -0
  115. package/dist/basic-modules/src/modules/justify/menu/JustifyCenterMenu.d.ts +12 -0
  116. package/dist/basic-modules/src/modules/justify/menu/JustifyJustifyMenu.d.ts +12 -0
  117. package/dist/basic-modules/src/modules/justify/menu/JustifyLeftMenu.d.ts +12 -0
  118. package/dist/basic-modules/src/modules/justify/menu/JustifyRightMenu.d.ts +12 -0
  119. package/dist/basic-modules/src/modules/justify/menu/index.d.ts +24 -0
  120. package/dist/basic-modules/src/modules/justify/parse-style-html.d.ts +8 -0
  121. package/dist/basic-modules/src/modules/justify/render-style.d.ts +13 -0
  122. package/dist/basic-modules/src/modules/justify/style-to-html.d.ts +6 -0
  123. package/dist/basic-modules/src/modules/line-height/custom-types.d.ts +10 -0
  124. package/dist/basic-modules/src/modules/line-height/index.d.ts +7 -0
  125. package/dist/basic-modules/src/modules/line-height/menu/LineHeightMenu.d.ts +26 -0
  126. package/dist/basic-modules/src/modules/line-height/menu/config.d.ts +5 -0
  127. package/dist/basic-modules/src/modules/line-height/menu/index.d.ts +12 -0
  128. package/dist/basic-modules/src/modules/line-height/parse-style-html.d.ts +8 -0
  129. package/dist/basic-modules/src/modules/line-height/render-style.d.ts +13 -0
  130. package/dist/basic-modules/src/modules/line-height/style-to-html.d.ts +6 -0
  131. package/dist/basic-modules/src/modules/link/custom-types.d.ts +11 -0
  132. package/dist/basic-modules/src/modules/link/elem-to-html.d.ts +11 -0
  133. package/dist/basic-modules/src/modules/link/helper.d.ts +20 -0
  134. package/dist/basic-modules/src/modules/link/index.d.ts +7 -0
  135. package/dist/basic-modules/src/modules/link/menu/EditLink.d.ts +29 -0
  136. package/dist/basic-modules/src/modules/link/menu/InsertLink.d.ts +25 -0
  137. package/dist/basic-modules/src/modules/link/menu/UnLink.d.ts +15 -0
  138. package/dist/basic-modules/src/modules/link/menu/ViewLink.d.ts +16 -0
  139. package/dist/basic-modules/src/modules/link/menu/config.d.ts +18 -0
  140. package/dist/basic-modules/src/modules/link/menu/index.d.ts +33 -0
  141. package/dist/basic-modules/src/modules/link/parse-elem-html.d.ts +14 -0
  142. package/dist/basic-modules/src/modules/link/plugin.d.ts +7 -0
  143. package/dist/basic-modules/src/modules/link/render-elem.d.ts +20 -0
  144. package/dist/basic-modules/src/modules/paragraph/custom-types.d.ts +9 -0
  145. package/dist/basic-modules/src/modules/paragraph/elem-to-html.d.ts +11 -0
  146. package/dist/basic-modules/src/modules/paragraph/index.d.ts +7 -0
  147. package/dist/basic-modules/src/modules/paragraph/parse-elem-html.d.ts +14 -0
  148. package/dist/basic-modules/src/modules/paragraph/plugin.d.ts +7 -0
  149. package/dist/basic-modules/src/modules/paragraph/render-elem.d.ts +20 -0
  150. package/dist/basic-modules/src/modules/text-style/custom-types.d.ts +14 -0
  151. package/dist/basic-modules/src/modules/text-style/helper.d.ts +8 -0
  152. package/dist/basic-modules/src/modules/text-style/index.d.ts +7 -0
  153. package/dist/basic-modules/src/modules/text-style/menu/BaseMenu.d.ts +27 -0
  154. package/dist/basic-modules/src/modules/text-style/menu/BoldMenu.d.ts +12 -0
  155. package/dist/basic-modules/src/modules/text-style/menu/ClearStyleMenu.d.ts +20 -0
  156. package/dist/basic-modules/src/modules/text-style/menu/CodeMenu.d.ts +12 -0
  157. package/dist/basic-modules/src/modules/text-style/menu/ItalicMenu.d.ts +12 -0
  158. package/dist/basic-modules/src/modules/text-style/menu/SubMenu.d.ts +13 -0
  159. package/dist/basic-modules/src/modules/text-style/menu/SupMenu.d.ts +13 -0
  160. package/dist/basic-modules/src/modules/text-style/menu/ThroughMenu.d.ts +12 -0
  161. package/dist/basic-modules/src/modules/text-style/menu/UnderlineMenu.d.ts +12 -0
  162. package/dist/basic-modules/src/modules/text-style/menu/index.d.ts +44 -0
  163. package/dist/basic-modules/src/modules/text-style/parse-style-html.d.ts +8 -0
  164. package/dist/basic-modules/src/modules/text-style/render-style.d.ts +13 -0
  165. package/dist/basic-modules/src/modules/text-style/style-to-html.d.ts +12 -0
  166. package/dist/basic-modules/src/modules/todo/custom-types.d.ts +10 -0
  167. package/dist/basic-modules/src/modules/todo/elem-to-html.d.ts +11 -0
  168. package/dist/basic-modules/src/modules/todo/index.d.ts +7 -0
  169. package/dist/basic-modules/src/modules/todo/menu/Todo.d.ts +15 -0
  170. package/dist/basic-modules/src/modules/todo/menu/index.d.ts +9 -0
  171. package/dist/basic-modules/src/modules/todo/parse-elem-html.d.ts +14 -0
  172. package/dist/basic-modules/src/modules/todo/plugin.d.ts +7 -0
  173. package/dist/basic-modules/src/modules/todo/pre-parse-html.d.ts +15 -0
  174. package/dist/basic-modules/src/modules/todo/render-elem.d.ts +20 -0
  175. package/dist/basic-modules/src/modules/undo-redo/index.d.ts +7 -0
  176. package/dist/basic-modules/src/modules/undo-redo/menu/RedoMenu.d.ts +15 -0
  177. package/dist/basic-modules/src/modules/undo-redo/menu/UndoMenu.d.ts +15 -0
  178. package/dist/basic-modules/src/modules/undo-redo/menu/index.d.ts +14 -0
  179. package/dist/basic-modules/src/utils/dom.d.ts +36 -0
  180. package/dist/basic-modules/src/utils/util.d.ts +11 -0
  181. package/dist/basic-modules/src/utils/vdom.d.ts +11 -0
  182. package/dist/code-highlight/src/constants/svg.d.ts +10 -0
  183. package/dist/code-highlight/src/custom-types.d.ts +17 -0
  184. package/dist/code-highlight/src/decorate/index.d.ts +7 -0
  185. package/dist/code-highlight/src/index.d.ts +9 -0
  186. package/dist/code-highlight/src/locale/en.d.ts +10 -0
  187. package/dist/code-highlight/src/locale/index.d.ts +5 -0
  188. package/dist/code-highlight/src/locale/zh-CN.d.ts +10 -0
  189. package/dist/code-highlight/src/module/elem-to-html.d.ts +11 -0
  190. package/dist/code-highlight/src/module/index.d.ts +7 -0
  191. package/dist/code-highlight/src/module/menu/SelectLangMenu.d.ts +24 -0
  192. package/dist/code-highlight/src/module/menu/config.d.ts +8 -0
  193. package/dist/code-highlight/src/module/menu/index.d.ts +15 -0
  194. package/dist/code-highlight/src/module/parse-style-html.d.ts +8 -0
  195. package/dist/code-highlight/src/module/render-style.d.ts +13 -0
  196. package/dist/code-highlight/src/utils/dom.d.ts +15 -0
  197. package/dist/code-highlight/src/utils/vdom.d.ts +11 -0
  198. package/dist/code-highlight/src/vendor/prism.d.ts +37 -0
  199. package/dist/core/src/config/index.d.ts +13 -0
  200. package/dist/core/src/config/interface.d.ts +219 -0
  201. package/dist/core/src/config/register.d.ts +12 -0
  202. package/dist/core/src/constants/index.d.ts +1 -0
  203. package/dist/core/src/constants/svg.d.ts +12 -0
  204. package/dist/core/src/create/bind-node-relation.d.ts +15 -0
  205. package/dist/core/src/create/create-editor.d.ts +10 -0
  206. package/dist/core/src/create/create-toolbar.d.ts +14 -0
  207. package/dist/core/src/create/helper.d.ts +37 -0
  208. package/dist/core/src/create/index.d.ts +7 -0
  209. package/dist/core/src/editor/dom-editor.d.ts +143 -0
  210. package/dist/core/src/editor/interface.d.ts +68 -0
  211. package/dist/core/src/editor/plugins/with-config.d.ts +7 -0
  212. package/dist/core/src/editor/plugins/with-content.d.ts +7 -0
  213. package/dist/core/src/editor/plugins/with-dom.d.ts +10 -0
  214. package/dist/core/src/editor/plugins/with-emitter.d.ts +7 -0
  215. package/dist/core/src/editor/plugins/with-event-data.d.ts +7 -0
  216. package/dist/core/src/editor/plugins/with-max-length.d.ts +7 -0
  217. package/dist/core/src/editor/plugins/with-selection.d.ts +7 -0
  218. package/dist/core/src/i18n/index.d.ts +32 -0
  219. package/dist/core/src/index.d.ts +32 -0
  220. package/dist/core/src/menus/bar/HoverBar.d.ts +48 -0
  221. package/dist/core/src/menus/bar/Toolbar.d.ts +35 -0
  222. package/dist/core/src/menus/bar-item/BaseButton.d.ts +26 -0
  223. package/dist/core/src/menus/bar-item/DropPanelButton.d.ts +14 -0
  224. package/dist/core/src/menus/bar-item/GroupButton.d.ts +17 -0
  225. package/dist/core/src/menus/bar-item/ModalButton.d.ts +25 -0
  226. package/dist/core/src/menus/bar-item/Select.d.ts +22 -0
  227. package/dist/core/src/menus/bar-item/SimpleButton.d.ts +11 -0
  228. package/dist/core/src/menus/bar-item/index.d.ts +24 -0
  229. package/dist/core/src/menus/bar-item/tooltip.d.ts +6 -0
  230. package/dist/core/src/menus/helpers/helpers.d.ts +18 -0
  231. package/dist/core/src/menus/helpers/position.d.ts +36 -0
  232. package/dist/core/src/menus/index.d.ts +9 -0
  233. package/dist/core/src/menus/interface.d.ts +65 -0
  234. package/dist/core/src/menus/panel-and-modal/BaseClass.d.ts +26 -0
  235. package/dist/core/src/menus/panel-and-modal/DropPanel.d.ts +14 -0
  236. package/dist/core/src/menus/panel-and-modal/Modal.d.ts +44 -0
  237. package/dist/core/src/menus/panel-and-modal/SelectList.d.ts +20 -0
  238. package/dist/core/src/menus/register.d.ts +15 -0
  239. package/dist/core/src/parse-html/helper.d.ts +10 -0
  240. package/dist/core/src/parse-html/index.d.ts +35 -0
  241. package/dist/core/src/parse-html/parse-common-elem-html.d.ts +15 -0
  242. package/dist/core/src/parse-html/parse-elem-html.d.ts +15 -0
  243. package/dist/core/src/parse-html/parse-text-elem-html.d.ts +15 -0
  244. package/dist/core/src/render/element/getRenderElem.d.ts +11 -0
  245. package/dist/core/src/render/element/renderElement.d.ts +9 -0
  246. package/dist/core/src/render/element/renderStyle.d.ts +13 -0
  247. package/dist/core/src/render/helper.d.ts +6 -0
  248. package/dist/core/src/render/index.d.ts +27 -0
  249. package/dist/core/src/render/node2Vnode.d.ts +15 -0
  250. package/dist/core/src/render/text/genVnode.d.ts +9 -0
  251. package/dist/core/src/render/text/renderStyle.d.ts +13 -0
  252. package/dist/core/src/render/text/renderText.d.ts +9 -0
  253. package/dist/core/src/text-area/TextArea.d.ts +47 -0
  254. package/dist/core/src/text-area/event-handlers/beforeInput.d.ts +8 -0
  255. package/dist/core/src/text-area/event-handlers/blur.d.ts +8 -0
  256. package/dist/core/src/text-area/event-handlers/click.d.ts +8 -0
  257. package/dist/core/src/text-area/event-handlers/composition.d.ts +27 -0
  258. package/dist/core/src/text-area/event-handlers/copy.d.ts +8 -0
  259. package/dist/core/src/text-area/event-handlers/cut.d.ts +8 -0
  260. package/dist/core/src/text-area/event-handlers/drag.d.ts +9 -0
  261. package/dist/core/src/text-area/event-handlers/drop.d.ts +8 -0
  262. package/dist/core/src/text-area/event-handlers/focus.d.ts +8 -0
  263. package/dist/core/src/text-area/event-handlers/index.d.ts +35 -0
  264. package/dist/core/src/text-area/event-handlers/keydown.d.ts +8 -0
  265. package/dist/core/src/text-area/event-handlers/keypress.d.ts +8 -0
  266. package/dist/core/src/text-area/event-handlers/paste.d.ts +8 -0
  267. package/dist/core/src/text-area/helpers.d.ts +26 -0
  268. package/dist/core/src/text-area/place-holder.d.ts +18 -0
  269. package/dist/core/src/text-area/syncSelection.d.ts +19 -0
  270. package/dist/core/src/text-area/update-view.d.ts +13 -0
  271. package/dist/core/src/to-html/elem2html.d.ts +8 -0
  272. package/dist/core/src/to-html/index.d.ts +32 -0
  273. package/dist/core/src/to-html/node2html.d.ts +8 -0
  274. package/dist/core/src/to-html/text2html.d.ts +8 -0
  275. package/dist/core/src/upload/createUploader.d.ts +8 -0
  276. package/dist/core/src/upload/index.d.ts +7 -0
  277. package/dist/core/src/upload/interface.d.ts +33 -0
  278. package/dist/core/src/utils/dom.d.ts +102 -0
  279. package/dist/core/src/utils/hotkeys.d.ts +35 -0
  280. package/dist/core/src/utils/key.d.ts +11 -0
  281. package/dist/core/src/utils/line.d.ts +14 -0
  282. package/dist/core/src/utils/ua.d.ts +14 -0
  283. package/dist/core/src/utils/util.d.ts +28 -0
  284. package/dist/core/src/utils/vdom.d.ts +34 -0
  285. package/dist/core/src/utils/weak-maps.d.ts +56 -0
  286. package/dist/css/style.css +29 -0
  287. package/dist/editor/src/Boot.d.ts +30 -0
  288. package/dist/editor/src/constants/svg.d.ts +14 -0
  289. package/dist/editor/src/create.d.ts +28 -0
  290. package/dist/editor/src/index.d.ts +18 -0
  291. package/dist/editor/src/init-default-config/config/hoverbar.d.ts +47 -0
  292. package/dist/editor/src/init-default-config/config/index.d.ts +67 -0
  293. package/dist/editor/src/init-default-config/config/toolbar.d.ts +16 -0
  294. package/dist/editor/src/init-default-config/index.d.ts +5 -0
  295. package/dist/editor/src/locale/en.d.ts +14 -0
  296. package/dist/editor/src/locale/index.d.ts +5 -0
  297. package/dist/editor/src/locale/zh-CN.d.ts +14 -0
  298. package/dist/editor/src/register-builtin-modules/index.d.ts +10 -0
  299. package/dist/editor/src/register-builtin-modules/register.d.ts +7 -0
  300. package/dist/editor/src/utils/browser-polyfill.d.ts +6 -0
  301. package/dist/editor/src/utils/dom.d.ts +6 -0
  302. package/dist/editor/src/utils/node-polyfill.d.ts +4 -0
  303. package/dist/index.js +1006 -0
  304. package/dist/index.mjs +1002 -0
  305. package/dist/list-module/src/constants/svg.d.ts +11 -0
  306. package/dist/list-module/src/index.d.ts +8 -0
  307. package/dist/list-module/src/locale/en.d.ts +11 -0
  308. package/dist/list-module/src/locale/index.d.ts +5 -0
  309. package/dist/list-module/src/locale/zh-CN.d.ts +11 -0
  310. package/dist/list-module/src/module/custom-types.d.ts +11 -0
  311. package/dist/list-module/src/module/elem-to-html.d.ts +15 -0
  312. package/dist/list-module/src/module/helpers.d.ts +13 -0
  313. package/dist/list-module/src/module/index.d.ts +7 -0
  314. package/dist/list-module/src/module/menu/BaseMenu.d.ts +18 -0
  315. package/dist/list-module/src/module/menu/BulletedListMenu.d.ts +11 -0
  316. package/dist/list-module/src/module/menu/NumberedListMenu.d.ts +11 -0
  317. package/dist/list-module/src/module/menu/index.d.ts +14 -0
  318. package/dist/list-module/src/module/parse-elem-html.d.ts +19 -0
  319. package/dist/list-module/src/module/plugin.d.ts +7 -0
  320. package/dist/list-module/src/module/render-elem.d.ts +13 -0
  321. package/dist/list-module/src/utils/dom.d.ts +19 -0
  322. package/dist/list-module/src/utils/maps.d.ts +6 -0
  323. package/dist/list-module/src/utils/util.d.ts +6 -0
  324. package/dist/plugin-float-image/src/constants/icon-svg.d.ts +12 -0
  325. package/dist/plugin-float-image/src/index.d.ts +8 -0
  326. package/dist/plugin-float-image/src/module/custom-types.d.ts +21 -0
  327. package/dist/plugin-float-image/src/module/elem-to-html.d.ts +11 -0
  328. package/dist/plugin-float-image/src/module/index.d.ts +8 -0
  329. package/dist/plugin-float-image/src/module/local.d.ts +5 -0
  330. package/dist/plugin-float-image/src/module/menu/FloatBase.d.ts +17 -0
  331. package/dist/plugin-float-image/src/module/menu/FloatLeft.d.ts +11 -0
  332. package/dist/plugin-float-image/src/module/menu/FloatNone.d.ts +11 -0
  333. package/dist/plugin-float-image/src/module/menu/FloatRight.d.ts +11 -0
  334. package/dist/plugin-float-image/src/module/menu/index.d.ts +19 -0
  335. package/dist/plugin-float-image/src/module/parse-elem-html.d.ts +13 -0
  336. package/dist/plugin-float-image/src/module/plugin.d.ts +7 -0
  337. package/dist/plugin-float-image/src/module/render-elem.d.ts +12 -0
  338. package/dist/plugin-float-image/src/utils/dom.d.ts +15 -0
  339. package/dist/table-module/src/constants/svg.d.ts +26 -0
  340. package/dist/table-module/src/index.d.ts +8 -0
  341. package/dist/table-module/src/locale/en.d.ts +43 -0
  342. package/dist/table-module/src/locale/index.d.ts +5 -0
  343. package/dist/table-module/src/locale/zh-CN.d.ts +43 -0
  344. package/dist/table-module/src/module/column-resize.d.ts +20 -0
  345. package/dist/table-module/src/module/custom-types.d.ts +39 -0
  346. package/dist/table-module/src/module/elem-to-html.d.ts +21 -0
  347. package/dist/table-module/src/module/helpers.d.ts +22 -0
  348. package/dist/table-module/src/module/index.d.ts +7 -0
  349. package/dist/table-module/src/module/menu/CellProperty.d.ts +11 -0
  350. package/dist/table-module/src/module/menu/DeleteCol.d.ts +15 -0
  351. package/dist/table-module/src/module/menu/DeleteRow.d.ts +15 -0
  352. package/dist/table-module/src/module/menu/DeleteTable.d.ts +15 -0
  353. package/dist/table-module/src/module/menu/FullWidth.d.ts +15 -0
  354. package/dist/table-module/src/module/menu/InsertCol.d.ts +15 -0
  355. package/dist/table-module/src/module/menu/InsertRow.d.ts +15 -0
  356. package/dist/table-module/src/module/menu/InsertTable.d.ts +24 -0
  357. package/dist/table-module/src/module/menu/MergeCell.d.ts +24 -0
  358. package/dist/table-module/src/module/menu/SplitCell.d.ts +24 -0
  359. package/dist/table-module/src/module/menu/TableHeader.d.ts +15 -0
  360. package/dist/table-module/src/module/menu/TableProperty.d.ts +34 -0
  361. package/dist/table-module/src/module/menu/index.d.ts +66 -0
  362. package/dist/table-module/src/module/parse-elem-html.d.ts +24 -0
  363. package/dist/table-module/src/module/parse-style-html.d.ts +8 -0
  364. package/dist/table-module/src/module/plugin.d.ts +7 -0
  365. package/dist/table-module/src/module/pre-parse-html.d.ts +15 -0
  366. package/dist/table-module/src/module/render-elem/index.d.ts +19 -0
  367. package/dist/table-module/src/module/render-elem/render-cell.d.ts +9 -0
  368. package/dist/table-module/src/module/render-elem/render-row.d.ts +9 -0
  369. package/dist/table-module/src/module/render-elem/render-table.d.ts +9 -0
  370. package/dist/table-module/src/module/render-style.d.ts +9 -0
  371. package/dist/table-module/src/module/style-to-html.d.ts +5 -0
  372. package/dist/table-module/src/module/table-cursor.d.ts +19 -0
  373. package/dist/table-module/src/module/weak-maps.d.ts +5 -0
  374. package/dist/table-module/src/module/with-selection.d.ts +2 -0
  375. package/dist/table-module/src/utils/dom.d.ts +31 -0
  376. package/dist/table-module/src/utils/has-common.d.ts +7 -0
  377. package/dist/table-module/src/utils/index.d.ts +5 -0
  378. package/dist/table-module/src/utils/is-of-type.d.ts +6 -0
  379. package/dist/table-module/src/utils/matrices.d.ts +9 -0
  380. package/dist/table-module/src/utils/options.d.ts +25 -0
  381. package/dist/table-module/src/utils/point.d.ts +7 -0
  382. package/dist/table-module/src/utils/types.d.ts +19 -0
  383. package/dist/table-module/src/utils/vdom.d.ts +11 -0
  384. package/dist/upload-image-module/src/constants/svg.d.ts +10 -0
  385. package/dist/upload-image-module/src/index.d.ts +8 -0
  386. package/dist/upload-image-module/src/locale/en.d.ts +11 -0
  387. package/dist/upload-image-module/src/locale/index.d.ts +5 -0
  388. package/dist/upload-image-module/src/locale/zh-CN.d.ts +11 -0
  389. package/dist/upload-image-module/src/module/index.d.ts +7 -0
  390. package/dist/upload-image-module/src/module/menu/UploadImageMenu.d.ts +16 -0
  391. package/dist/upload-image-module/src/module/menu/config.d.ts +6 -0
  392. package/dist/upload-image-module/src/module/menu/index.d.ts +10 -0
  393. package/dist/upload-image-module/src/module/plugin.d.ts +7 -0
  394. package/dist/upload-image-module/src/module/upload-images.d.ts +11 -0
  395. package/dist/upload-image-module/src/utils/dom.d.ts +7 -0
  396. package/dist/video-module/src/constants/svg.d.ts +12 -0
  397. package/dist/video-module/src/index.d.ts +8 -0
  398. package/dist/video-module/src/locale/en.d.ts +21 -0
  399. package/dist/video-module/src/locale/index.d.ts +5 -0
  400. package/dist/video-module/src/locale/zh-CN.d.ts +21 -0
  401. package/dist/video-module/src/module/custom-types.d.ts +23 -0
  402. package/dist/video-module/src/module/elem-to-html.d.ts +11 -0
  403. package/dist/video-module/src/module/helper/insert-video.d.ts +12 -0
  404. package/dist/video-module/src/module/helper/upload-videos.d.ts +6 -0
  405. package/dist/video-module/src/module/index.d.ts +7 -0
  406. package/dist/video-module/src/module/menu/EditVideoSizeMenu.d.ts +25 -0
  407. package/dist/video-module/src/module/menu/EditVideoSrcMenu.d.ts +26 -0
  408. package/dist/video-module/src/module/menu/InsertVideoMenu.d.ts +25 -0
  409. package/dist/video-module/src/module/menu/UploadVideoMenu.d.ts +16 -0
  410. package/dist/video-module/src/module/menu/config.d.ts +25 -0
  411. package/dist/video-module/src/module/menu/index.d.ts +30 -0
  412. package/dist/video-module/src/module/parse-elem-html.d.ts +14 -0
  413. package/dist/video-module/src/module/plugin.d.ts +7 -0
  414. package/dist/video-module/src/module/pre-parse-html.d.ts +15 -0
  415. package/dist/video-module/src/module/render-elem.d.ts +13 -0
  416. package/dist/video-module/src/utils/dom.d.ts +29 -0
  417. package/dist/video-module/src/utils/util.d.ts +12 -0
  418. package/package.json +49 -0
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @description 自定义 element
3
+ * @author wangfupeng
4
+ */
5
+ import { Text } from 'slate';
6
+ export type TableCellProperty = {
7
+ /** 用于设置单元格属性 */
8
+ backgroundColor?: string;
9
+ borderWidth?: string;
10
+ borderStyle?: string;
11
+ borderColor?: string;
12
+ textAlign?: string;
13
+ };
14
+ export type TableCellElement = {
15
+ type: 'table-cell';
16
+ isHeader?: boolean;
17
+ colSpan?: number;
18
+ rowSpan?: number;
19
+ width?: string;
20
+ children: Text[];
21
+ /** 用于设置单元格的 display 属性 */
22
+ hidden?: boolean;
23
+ } & TableCellProperty;
24
+ export type TableRowElement = {
25
+ type: 'table-row';
26
+ children: TableCellElement[];
27
+ };
28
+ export type TableElement = {
29
+ type: 'table';
30
+ width: string;
31
+ children: TableRowElement[];
32
+ /** resize bar */
33
+ scrollWidth?: number;
34
+ height?: number;
35
+ resizingIndex?: number;
36
+ isResizing?: boolean | null;
37
+ isHoverCellBorder?: boolean;
38
+ columnWidths?: number[];
39
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @description to html
3
+ * @author wangfupeng
4
+ */
5
+ import { Element } from 'slate';
6
+ declare function tableToHtml(elemNode: Element, childrenHtml: string): string;
7
+ declare function tableRowToHtml(elem: Element, childrenHtml: string): string;
8
+ declare function tableCellToHtml(cellNode: Element, childrenHtml: string): string;
9
+ export declare const tableToHtmlConf: {
10
+ type: string;
11
+ elemToHtml: typeof tableToHtml;
12
+ };
13
+ export declare const tableRowToHtmlConf: {
14
+ type: string;
15
+ elemToHtml: typeof tableRowToHtml;
16
+ };
17
+ export declare const tableCellToHtmlConf: {
18
+ type: string;
19
+ elemToHtml: typeof tableCellToHtml;
20
+ };
21
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @description table menu helpers
3
+ * @author wangfupeng
4
+ */
5
+ import { IDomEditor } from '@wangeditor-next/core';
6
+ import { TableCellElement, TableElement } from './custom-types';
7
+ /**
8
+ * 获取第一行所有 cells
9
+ * @param tableNode table node
10
+ */
11
+ export declare function getFirstRowCells(tableNode: TableElement): TableCellElement[];
12
+ /**
13
+ * 表格是否带有表头?
14
+ * @param tableNode table node
15
+ */
16
+ export declare function isTableWithHeader(tableNode: TableElement): boolean;
17
+ /**
18
+ * 单元格是否在第一行
19
+ * @param editor editor
20
+ * @param cellNode cell node
21
+ */
22
+ export declare function isCellInFirstRow(editor: IDomEditor, cellNode: TableCellElement): boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @description table module
3
+ * @author wangfupeng
4
+ */
5
+ import { IModuleConf } from '@wangeditor-next/core';
6
+ declare const table: Partial<IModuleConf>;
7
+ export default table;
@@ -0,0 +1,11 @@
1
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
2
+ import TableProperty from './TableProperty';
3
+ declare class CellProperty extends TableProperty implements IButtonMenu {
4
+ readonly title: string;
5
+ readonly iconSvg = "<svg viewBox=\"0 0 20 20\"><path d=\"m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z\" opacity=\".6\"/><path d=\"m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z\"/></svg>";
6
+ readonly tag = "button";
7
+ readonly showModal = true;
8
+ readonly modalWidth = 300;
9
+ getModalContentNode(editor: IDomEditor): import("slate").NodeEntry<import("../../utils").WithType<import("packages/custom-types").CustomElement>>;
10
+ }
11
+ export default CellProperty;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description del col menu
3
+ * @author wangfupeng
4
+ */
5
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ declare class DeleteCol implements IButtonMenu {
7
+ readonly title: string;
8
+ readonly iconSvg = "<svg viewBox=\"0 0 1048 1024\"><path d=\"M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z\"></path></svg>";
9
+ readonly tag = "button";
10
+ getValue(_editor: IDomEditor): string | boolean;
11
+ isActive(_editor: IDomEditor): boolean;
12
+ isDisabled(editor: IDomEditor): boolean;
13
+ exec(editor: IDomEditor, _value: string | boolean): void;
14
+ }
15
+ export default DeleteCol;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description del row menu
3
+ * @author wangfupeng
4
+ */
5
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ declare class DeleteRow implements IButtonMenu {
7
+ readonly title: string;
8
+ readonly iconSvg = "<svg viewBox=\"0 0 1048 1024\"><path d=\"M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z\"></path></svg>";
9
+ readonly tag = "button";
10
+ getValue(_editor: IDomEditor): string | boolean;
11
+ isActive(_editor: IDomEditor): boolean;
12
+ isDisabled(editor: IDomEditor): boolean;
13
+ exec(editor: IDomEditor, _value: string | boolean): void;
14
+ }
15
+ export default DeleteRow;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description del table menu
3
+ * @author wangfupeng
4
+ */
5
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ declare class DeleteTable implements IButtonMenu {
7
+ readonly title: string;
8
+ readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z\" p-id=\"9577\"></path><path d=\"M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z\"></path></svg>";
9
+ readonly tag = "button";
10
+ getValue(_editor: IDomEditor): string | boolean;
11
+ isActive(_editor: IDomEditor): boolean;
12
+ isDisabled(editor: IDomEditor): boolean;
13
+ exec(editor: IDomEditor, _value: string | boolean): void;
14
+ }
15
+ export default DeleteTable;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description table full width menu
3
+ * @author wangfupeng
4
+ */
5
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ declare class TableFullWidth implements IButtonMenu {
7
+ readonly title: string;
8
+ readonly iconSvg = "<svg viewBox=\"0 0 1228 1024\"><path d=\"M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z\"></path></svg>";
9
+ readonly tag = "button";
10
+ getValue(editor: IDomEditor): string | boolean;
11
+ isActive(editor: IDomEditor): boolean;
12
+ isDisabled(editor: IDomEditor): boolean;
13
+ exec(editor: IDomEditor, value: string | boolean): void;
14
+ }
15
+ export default TableFullWidth;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description insert col menu
3
+ * @author wangfupeng
4
+ */
5
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ declare class InsertCol implements IButtonMenu {
7
+ readonly title: string;
8
+ readonly iconSvg = "<svg viewBox=\"0 0 1048 1024\"><path d=\"M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z\"></path></svg>";
9
+ readonly tag = "button";
10
+ getValue(_editor: IDomEditor): string | boolean;
11
+ isActive(_editor: IDomEditor): boolean;
12
+ isDisabled(editor: IDomEditor): boolean;
13
+ exec(editor: IDomEditor, _value: string | boolean): void;
14
+ }
15
+ export default InsertCol;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description insert row menu
3
+ * @author wangfupeng
4
+ */
5
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ declare class InsertRow implements IButtonMenu {
7
+ readonly title: string;
8
+ readonly iconSvg = "<svg viewBox=\"0 0 1048 1024\"><path d=\"M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z\"></path></svg>";
9
+ readonly tag = "button";
10
+ getValue(_editor: IDomEditor): string | boolean;
11
+ isActive(_editor: IDomEditor): boolean;
12
+ isDisabled(editor: IDomEditor): boolean;
13
+ exec(editor: IDomEditor, _value: string | boolean): void;
14
+ }
15
+ export default InsertRow;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @description insert table menu
3
+ * @author wangfupeng
4
+ */
5
+ import { IDomEditor, IDropPanelMenu } from '@wangeditor-next/core';
6
+ import { DOMElement } from '../../utils/dom';
7
+ declare class InsertTable implements IDropPanelMenu {
8
+ title: string;
9
+ iconSvg: string;
10
+ tag: string;
11
+ showDropPanel: boolean;
12
+ private $content;
13
+ getValue(_editor: IDomEditor): string | boolean;
14
+ isActive(_editor: IDomEditor): boolean;
15
+ exec(_editor: IDomEditor, _value: string | boolean): void;
16
+ isDisabled(editor: IDomEditor): boolean;
17
+ /**
18
+ * 获取 panel 内容
19
+ * @param editor editor
20
+ */
21
+ getPanelContentElem(editor: IDomEditor): DOMElement;
22
+ private insertTable;
23
+ }
24
+ export default InsertTable;
@@ -0,0 +1,24 @@
1
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
2
+ import { Editor } from 'slate';
3
+ declare class MergeCell implements IButtonMenu {
4
+ readonly title: string;
5
+ readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z\"/></svg>";
6
+ readonly tag = "button";
7
+ getValue(_editor: IDomEditor): string | boolean;
8
+ isActive(_editor: IDomEditor): boolean;
9
+ isDisabled(editor: IDomEditor): boolean;
10
+ exec(editor: IDomEditor, _value: string | boolean): void;
11
+ /**
12
+ * Checks if the current selection can be merged. Merging is not possible when any of the following conditions are met:
13
+ * - The selection is empty.
14
+ * - The selection is not within the same "thead", "tbody," or "tfoot" section.
15
+ * @returns {boolean} `true` if the selection can be merged, otherwise `false`.
16
+ */
17
+ canMerge(editor: Editor): boolean;
18
+ /**
19
+ * Merges the selected cells in the table.
20
+ * @returns void
21
+ */
22
+ merge(editor: Editor): void;
23
+ }
24
+ export default MergeCell;
@@ -0,0 +1,24 @@
1
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
2
+ import { Editor } from 'slate';
3
+ declare class SplitCell implements IButtonMenu {
4
+ readonly title: string;
5
+ readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z\"/><path d=\"M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z\"/></svg>";
6
+ readonly tag = "button";
7
+ getValue(_editor: IDomEditor): string | boolean;
8
+ isActive(_editor: IDomEditor): boolean;
9
+ isDisabled(editor: IDomEditor): boolean;
10
+ exec(editor: IDomEditor, _value: string | boolean): void;
11
+ /**
12
+ * Splits either the cell at the current selection or a specified location. If a range
13
+ * selection is present, all cells within the range will be split.
14
+ * @param {Location} [options.at] - Splits the cell at the specified location. If no
15
+ * location is specified it will split the cell at the current selection
16
+ * @param {boolean} [options.all] - If true, splits all cells in the table
17
+ * @returns void
18
+ */
19
+ split(editor: Editor, options?: {
20
+ at?: Location;
21
+ all?: boolean;
22
+ }): void;
23
+ }
24
+ export default SplitCell;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description table header menu
3
+ * @author wangfupeng
4
+ */
5
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ declare class TableHeader implements IButtonMenu {
7
+ readonly title: string;
8
+ readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z\"></path></svg>";
9
+ readonly tag = "button";
10
+ getValue(editor: IDomEditor): string | boolean;
11
+ isActive(editor: IDomEditor): boolean;
12
+ isDisabled(editor: IDomEditor): boolean;
13
+ exec(editor: IDomEditor, value: string | boolean): void;
14
+ }
15
+ export default TableHeader;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @description set cell property menu
3
+ * @author hsuna
4
+ */
5
+ import { IButtonMenu, IDomEditor } from '@wangeditor-next/core';
6
+ declare class TableProperty implements IButtonMenu {
7
+ readonly title: string;
8
+ iconSvg: string;
9
+ readonly tag = "button";
10
+ readonly showModal = true;
11
+ readonly modalWidth = 300;
12
+ readonly borderStyle: {
13
+ value: string;
14
+ label: string;
15
+ }[];
16
+ readonly textAlignOptions: {
17
+ value: string;
18
+ label: string;
19
+ svg: string;
20
+ }[];
21
+ getValue(_editor: IDomEditor): string | boolean;
22
+ isActive(_editor: IDomEditor): boolean;
23
+ isDisabled(editor: IDomEditor): boolean;
24
+ exec(_editor: IDomEditor, _value: string | boolean): void;
25
+ getModalContentNode(editor: IDomEditor): import("slate").NodeEntry<import("../../utils").WithType<import("packages/custom-types").CustomElement>>;
26
+ getModalPositionNode(_editor: IDomEditor): null;
27
+ getModalContentElem(editor: IDomEditor): Element | null;
28
+ getPanelContentElem(editor: any, { mark, selectedColor, callback }: {
29
+ mark: any;
30
+ selectedColor: any;
31
+ callback: any;
32
+ }): import("dom7").Dom7Array;
33
+ }
34
+ export default TableProperty;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @description table menu
3
+ * @author wangfupeng
4
+ */
5
+ import CellProperty from './CellProperty';
6
+ import DeleteCol from './DeleteCol';
7
+ import DeleteRow from './DeleteRow';
8
+ import DeleteTable from './DeleteTable';
9
+ import FullWidth from './FullWidth';
10
+ import InsertCol from './InsertCol';
11
+ import InsertRow from './InsertRow';
12
+ import InsertTable from './InsertTable';
13
+ import MergeCell from './MergeCell';
14
+ import SplitCell from './SplitCell';
15
+ import TableHander from './TableHeader';
16
+ import TableProperty from './TableProperty';
17
+ export declare const insertTableMenuConf: {
18
+ key: string;
19
+ factory(): InsertTable;
20
+ };
21
+ export declare const deleteTableMenuConf: {
22
+ key: string;
23
+ factory(): DeleteTable;
24
+ };
25
+ export declare const insertTableRowConf: {
26
+ key: string;
27
+ factory(): InsertRow;
28
+ };
29
+ export declare const deleteTableRowConf: {
30
+ key: string;
31
+ factory(): DeleteRow;
32
+ };
33
+ export declare const insertTableColConf: {
34
+ key: string;
35
+ factory(): InsertCol;
36
+ };
37
+ export declare const deleteTableColConf: {
38
+ key: string;
39
+ factory(): DeleteCol;
40
+ };
41
+ export declare const tableHeaderMenuConf: {
42
+ key: string;
43
+ factory(): TableHander;
44
+ };
45
+ export declare const tableFullWidthMenuConf: {
46
+ key: string;
47
+ factory(): FullWidth;
48
+ };
49
+ /** Meger / Split conf */
50
+ export declare const mergeTableCellConf: {
51
+ key: string;
52
+ factory(): MergeCell;
53
+ };
54
+ export declare const splitTableCellConf: {
55
+ key: string;
56
+ factory(): SplitCell;
57
+ };
58
+ /** set property conf */
59
+ export declare const setTablePropertyConf: {
60
+ key: string;
61
+ factory(): TableProperty;
62
+ };
63
+ export declare const setTableCellPropertyConf: {
64
+ key: string;
65
+ factory(): CellProperty;
66
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @description parse html
3
+ * @author wangfupeng
4
+ */
5
+ import { IDomEditor } from '@wangeditor-next/core';
6
+ import { Descendant } from 'slate';
7
+ import { DOMElement } from '../utils/dom';
8
+ import { TableCellElement, TableElement, TableRowElement } from './custom-types';
9
+ declare function parseCellHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): TableCellElement;
10
+ export declare const parseCellHtmlConf: {
11
+ selector: string;
12
+ parseElemHtml: typeof parseCellHtml;
13
+ };
14
+ declare function parseRowHtml(_elem: DOMElement, children: Descendant[], _editor: IDomEditor): TableRowElement;
15
+ export declare const parseRowHtmlConf: {
16
+ selector: string;
17
+ parseElemHtml: typeof parseRowHtml;
18
+ };
19
+ declare function parseTableHtml(elem: DOMElement, children: Descendant[], _editor: IDomEditor): TableElement;
20
+ export declare const parseTableHtmlConf: {
21
+ selector: string;
22
+ parseElemHtml: typeof parseTableHtml;
23
+ };
24
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @description parse style html
3
+ * @author hsuna
4
+ */
5
+ import { IDomEditor } from '@wangeditor-next/core';
6
+ import { Descendant } from 'slate';
7
+ import { DOMElement } from '../utils/dom';
8
+ export declare function parseStyleHtml(elem: DOMElement, node: Descendant, _editor: IDomEditor): Descendant;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @description editor 插件,重写 editor API
3
+ * @author wangfupeng
4
+ */
5
+ import { IDomEditor } from '@wangeditor-next/core';
6
+ declare function withTable<T extends IDomEditor>(editor: T): T;
7
+ export default withTable;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @description pre parse html
3
+ * @author wangfupeng
4
+ */
5
+ import { DOMElement } from '../utils/dom';
6
+ /**
7
+ * pre-prase table ,去掉 <tbody>
8
+ * @param table table elem
9
+ */
10
+ declare function preParse(tableElem: DOMElement): DOMElement;
11
+ export declare const preParseTableHtmlConf: {
12
+ selector: string;
13
+ preParseHtml: typeof preParse;
14
+ };
15
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @description render elem
3
+ * @author wangfupeng
4
+ */
5
+ import renderTableCell from './render-cell';
6
+ import renderTableRow from './render-row';
7
+ import renderTable from './render-table';
8
+ export declare const renderTableConf: {
9
+ type: string;
10
+ renderElem: typeof renderTable;
11
+ };
12
+ export declare const renderTableRowConf: {
13
+ type: string;
14
+ renderElem: typeof renderTableRow;
15
+ };
16
+ export declare const renderTableCellConf: {
17
+ type: string;
18
+ renderElem: typeof renderTableCell;
19
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @description render cell
3
+ * @author wangfupeng
4
+ */
5
+ import { IDomEditor } from '@wangeditor-next/core';
6
+ import { Element as SlateElement } from 'slate';
7
+ import { VNode } from 'snabbdom';
8
+ declare function renderTableCell(cellNode: SlateElement, children: VNode[] | null, editor: IDomEditor): VNode;
9
+ export default renderTableCell;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @description render row
3
+ * @author wangfupeng
4
+ */
5
+ import { IDomEditor } from '@wangeditor-next/core';
6
+ import { Element as SlateElement } from 'slate';
7
+ import { VNode } from 'snabbdom';
8
+ declare function renderTableRow(_elemNode: SlateElement, children: VNode[] | null, _editor: IDomEditor): VNode;
9
+ export default renderTableRow;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @description render table
3
+ * @author wangfupeng
4
+ */
5
+ import { IDomEditor } from '@wangeditor-next/core';
6
+ import { Element as SlateElement } from 'slate';
7
+ import { VNode } from 'snabbdom';
8
+ declare function renderTable(elemNode: SlateElement, children: VNode[] | null, editor: IDomEditor): VNode;
9
+ export default renderTable;
@@ -0,0 +1,9 @@
1
+ import { Descendant } from 'slate';
2
+ import { VNode } from 'snabbdom';
3
+ /**
4
+ * 添加样式
5
+ * @param node slate elem
6
+ * @param vnode vnode
7
+ * @returns vnode
8
+ */
9
+ export declare function renderStyle(node: Descendant, vnode: VNode): VNode;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @description style to html
3
+ * @author hsuna
4
+ */
5
+ export declare function styleToHtml(node: any, elemHtml: any): any;
@@ -0,0 +1,19 @@
1
+ import { Editor, Element, Location, NodeEntry } from 'slate';
2
+ export declare const TableCursor: {
3
+ /** @returns {boolean} `true` if the selection is inside a table, otherwise `false`. */
4
+ isInTable(editor: Editor, options?: {
5
+ at?: Location;
6
+ }): boolean;
7
+ /**
8
+ * Retrieves a matrix representing the selected cells within a table.
9
+ * @returns {NodeEntry<T>[][]} A matrix containing the selected cells.
10
+ */
11
+ selection(editor: Editor): Generator<NodeEntry[]>;
12
+ /** Clears the selection from the table */
13
+ unselect(editor: Editor): void;
14
+ /**
15
+ * Checks whether a given cell is part of the current table selection.
16
+ * @returns {boolean} - Returns true if the cell is selected, otherwise false.
17
+ */
18
+ isSelected<T extends Element>(editor: Editor, element: T): boolean;
19
+ };
@@ -0,0 +1,5 @@
1
+ import { NodeEntryWithContext } from '../utils';
2
+ /** Weak reference between the `Editor` and the selected elements */
3
+ export declare const EDITOR_TO_SELECTION: WeakMap<import("slate").BaseEditor, NodeEntryWithContext[][]>;
4
+ /** Weak reference between the `Editor` and a set of the selected elements */
5
+ export declare const EDITOR_TO_SELECTION_SET: WeakMap<import("slate").BaseEditor, WeakSet<import("packages/custom-types").CustomElement>>;
@@ -0,0 +1,2 @@
1
+ import { Editor } from 'slate';
2
+ export declare function withSelection<T extends Editor>(editor: T): T;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @description DOM 操作
3
+ * @author wangfupeng
4
+ */
5
+ import $, { Dom7Array } from 'dom7';
6
+ import DOMNode = globalThis.Node;
7
+ import DOMComment = globalThis.Comment;
8
+ import DOMElement = globalThis.Element;
9
+ import DOMText = globalThis.Text;
10
+ import DOMRange = globalThis.Range;
11
+ import DOMSelection = globalThis.Selection;
12
+ import DOMStaticRange = globalThis.StaticRange;
13
+ export { Dom7Array } from 'dom7';
14
+ export default $;
15
+ /**
16
+ * 获取 tagName lower-case
17
+ * @param $elem $elem
18
+ */
19
+ export declare function getTagName($elem: Dom7Array): string;
20
+ /**
21
+ * 获取 $elem 某一个 style 值
22
+ * @param $elem $elem
23
+ * @param styleKey style key
24
+ */
25
+ export declare function getStyleValue($elem: Dom7Array, styleKey: string): string;
26
+ /**
27
+ * 获取 outerHTML
28
+ * @param $elem dom7 elem
29
+ */
30
+ export declare function getOuterHTML($elem: Dom7Array): string;
31
+ export { DOMComment, DOMElement, DOMNode, DOMRange, DOMSelection, DOMStaticRange, DOMText, };
@@ -0,0 +1,7 @@
1
+ import { Editor, Span } from 'slate';
2
+ import { WithTableOptions } from './options';
3
+ /**
4
+ * Determines whether two paths belong to the same types by checking
5
+ * if they share a common ancestor node of type table
6
+ */
7
+ export declare function hasCommon(editor: Editor, [path, another]: Span, ...types: Array<keyof WithTableOptions['blocks']>): boolean;
@@ -0,0 +1,5 @@
1
+ export * from './has-common';
2
+ export * from './is-of-type';
3
+ export * from './matrices';
4
+ export * from './point';
5
+ export * from './types';
@@ -0,0 +1,6 @@
1
+ import { Editor, Element, Node, NodeMatch } from 'slate';
2
+ import { WithTableOptions } from './options';
3
+ import { WithType } from './types';
4
+ export declare function isElement<T extends Element>(node: Node): node is WithType<T>;
5
+ /** @returns a `NodeMatch` function which is used to match the elements of a specific `type`. */
6
+ export declare function isOfType<T extends WithType<Element>>(editor: Editor, ...types: Array<keyof WithTableOptions['blocks']>): NodeMatch<T>;
@@ -0,0 +1,9 @@
1
+ import { Editor, Location, NodeEntry } from 'slate';
2
+ import { CellElement, NodeEntryWithContext } from './types';
3
+ /** Generates a matrix for each table section (`thead`, `tbody`, `tfoot`) */
4
+ export declare function matrices(editor: Editor, options?: {
5
+ at?: Location;
6
+ }): Generator<NodeEntry<CellElement>[][]>;
7
+ export declare function filledMatrix(editor: Editor, options?: {
8
+ at?: Location;
9
+ }): NodeEntryWithContext[][];