@progress/kendo-vue-editor 5.3.0-dev.202410141143 → 5.3.0-develop.2

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 (361) hide show
  1. package/Editor.js +8 -0
  2. package/Editor.mjs +584 -0
  3. package/README.md +25 -31
  4. package/config/defaultStyles.js +204 -0
  5. package/config/defaultStyles.mjs +209 -0
  6. package/config/schema.js +8 -0
  7. package/config/schema.mjs +44 -0
  8. package/config/shortcuts.js +8 -0
  9. package/config/shortcuts.mjs +41 -0
  10. package/config/toolsSettings.js +8 -0
  11. package/config/toolsSettings.mjs +558 -0
  12. package/dialogs/FindReplace.js +8 -0
  13. package/dialogs/FindReplace.mjs +366 -0
  14. package/dialogs/insertImage.js +8 -0
  15. package/dialogs/insertImage.mjs +211 -0
  16. package/dialogs/insertLink.js +8 -0
  17. package/dialogs/insertLink.mjs +164 -0
  18. package/dialogs/viewHtml.js +8 -0
  19. package/dialogs/viewHtml.mjs +128 -0
  20. package/dist/cdn/js/kendo-vue-editor.js +8 -1
  21. package/index.d.mts +2936 -0
  22. package/index.d.ts +2936 -0
  23. package/index.js +8 -0
  24. package/index.mjs +207 -0
  25. package/messages/main.js +8 -0
  26. package/messages/main.mjs +182 -0
  27. package/package-metadata.js +8 -0
  28. package/package-metadata.mjs +18 -0
  29. package/package.json +23 -62
  30. package/tools/align.js +8 -0
  31. package/tools/align.mjs +69 -0
  32. package/tools/applyColor.js +8 -0
  33. package/tools/applyColor.mjs +71 -0
  34. package/tools/cleanFormatting.js +8 -0
  35. package/tools/cleanFormatting.mjs +65 -0
  36. package/tools/findReplace.js +8 -0
  37. package/tools/findReplace.mjs +67 -0
  38. package/tools/fontStyle.js +8 -0
  39. package/tools/fontStyle.mjs +104 -0
  40. package/tools/formatBlock.js +8 -0
  41. package/tools/formatBlock.mjs +96 -0
  42. package/tools/indent.js +8 -0
  43. package/tools/indent.mjs +63 -0
  44. package/tools/inlineFormat.js +8 -0
  45. package/tools/inlineFormat.mjs +80 -0
  46. package/tools/insertImage.js +8 -0
  47. package/tools/insertImage.mjs +77 -0
  48. package/tools/insertLink.js +8 -0
  49. package/tools/insertLink.mjs +76 -0
  50. package/tools/insertTable/popup.js +8 -0
  51. package/tools/insertTable/popup.mjs +105 -0
  52. package/tools/insertTable/popupGrid.js +8 -0
  53. package/tools/insertTable/popupGrid.mjs +83 -0
  54. package/tools/insertTable/tool.js +8 -0
  55. package/tools/insertTable/tool.mjs +98 -0
  56. package/tools/lists.js +8 -0
  57. package/tools/lists.mjs +77 -0
  58. package/tools/outdent.js +8 -0
  59. package/tools/outdent.mjs +75 -0
  60. package/tools/pdf.js +8 -0
  61. package/tools/pdf.mjs +63 -0
  62. package/tools/print.js +8 -0
  63. package/tools/print.mjs +58 -0
  64. package/tools/proseMirrorTool.js +8 -0
  65. package/tools/proseMirrorTool.mjs +61 -0
  66. package/tools/selectAll.js +8 -0
  67. package/tools/selectAll.mjs +56 -0
  68. package/tools/unlink.js +8 -0
  69. package/tools/unlink.mjs +64 -0
  70. package/tools/utils.js +8 -0
  71. package/tools/utils.mjs +18 -0
  72. package/tools/viewHtml.js +8 -0
  73. package/tools/viewHtml.mjs +72 -0
  74. package/utils/browser-detection.js +8 -0
  75. package/utils/browser-detection.mjs +11 -0
  76. package/utils/controlled-value.js +8 -0
  77. package/utils/controlled-value.mjs +18 -0
  78. package/utils/main.js +8 -0
  79. package/utils/main.mjs +162 -0
  80. package/utils/props-key.js +8 -0
  81. package/utils/props-key.mjs +12 -0
  82. package/dist/es/Editor.d.ts +0 -283
  83. package/dist/es/Editor.js +0 -812
  84. package/dist/es/EditorProps.d.ts +0 -194
  85. package/dist/es/EditorProps.js +0 -1
  86. package/dist/es/additionalTypes.ts +0 -21
  87. package/dist/es/config/defaultStyles.d.ts +0 -12
  88. package/dist/es/config/defaultStyles.js +0 -12
  89. package/dist/es/config/pasteSettings.d.ts +0 -6
  90. package/dist/es/config/pasteSettings.js +0 -1
  91. package/dist/es/config/schema.d.ts +0 -8
  92. package/dist/es/config/schema.js +0 -51
  93. package/dist/es/config/shortcuts.d.ts +0 -24
  94. package/dist/es/config/shortcuts.js +0 -61
  95. package/dist/es/config/toolsSettings.d.ts +0 -489
  96. package/dist/es/config/toolsSettings.js +0 -528
  97. package/dist/es/dialogs/EditorDialogProps.d.ts +0 -23
  98. package/dist/es/dialogs/EditorDialogProps.js +0 -1
  99. package/dist/es/dialogs/FindReplace.d.ts +0 -70
  100. package/dist/es/dialogs/FindReplace.js +0 -909
  101. package/dist/es/dialogs/insertImage.d.ts +0 -54
  102. package/dist/es/dialogs/insertImage.js +0 -1164
  103. package/dist/es/dialogs/insertLink.d.ts +0 -52
  104. package/dist/es/dialogs/insertLink.js +0 -826
  105. package/dist/es/dialogs/main.d.ts +0 -1
  106. package/dist/es/dialogs/main.js +0 -42
  107. package/dist/es/dialogs/viewHtml.d.ts +0 -51
  108. package/dist/es/dialogs/viewHtml.js +0 -201
  109. package/dist/es/main.d.ts +0 -192
  110. package/dist/es/main.js +0 -217
  111. package/dist/es/messages/main.d.ts +0 -172
  112. package/dist/es/messages/main.js +0 -503
  113. package/dist/es/package-metadata.d.ts +0 -5
  114. package/dist/es/package-metadata.js +0 -11
  115. package/dist/es/tools/ToolProps.d.ts +0 -35
  116. package/dist/es/tools/ToolProps.js +0 -1
  117. package/dist/es/tools/align.d.ts +0 -42
  118. package/dist/es/tools/align.js +0 -111
  119. package/dist/es/tools/applyColor.d.ts +0 -45
  120. package/dist/es/tools/applyColor.js +0 -100
  121. package/dist/es/tools/cleanFormatting.d.ts +0 -49
  122. package/dist/es/tools/cleanFormatting.js +0 -107
  123. package/dist/es/tools/findReplace.d.ts +0 -43
  124. package/dist/es/tools/findReplace.js +0 -115
  125. package/dist/es/tools/fontStyle.d.ts +0 -55
  126. package/dist/es/tools/fontStyle.js +0 -150
  127. package/dist/es/tools/formatBlock.d.ts +0 -45
  128. package/dist/es/tools/formatBlock.js +0 -145
  129. package/dist/es/tools/history.d.ts +0 -18
  130. package/dist/es/tools/history.js +0 -3
  131. package/dist/es/tools/indent.d.ts +0 -44
  132. package/dist/es/tools/indent.js +0 -121
  133. package/dist/es/tools/inlineFormat.d.ts +0 -74
  134. package/dist/es/tools/inlineFormat.js +0 -120
  135. package/dist/es/tools/insertImage.d.ts +0 -46
  136. package/dist/es/tools/insertImage.js +0 -126
  137. package/dist/es/tools/insertLink.d.ts +0 -46
  138. package/dist/es/tools/insertLink.js +0 -126
  139. package/dist/es/tools/insertTable/popup.d.ts +0 -80
  140. package/dist/es/tools/insertTable/popup.js +0 -177
  141. package/dist/es/tools/insertTable/popupGrid.d.ts +0 -51
  142. package/dist/es/tools/insertTable/popupGrid.js +0 -131
  143. package/dist/es/tools/insertTable/tool.d.ts +0 -53
  144. package/dist/es/tools/insertTable/tool.js +0 -157
  145. package/dist/es/tools/lists.d.ts +0 -48
  146. package/dist/es/tools/lists.js +0 -124
  147. package/dist/es/tools/main.d.ts +0 -95
  148. package/dist/es/tools/main.js +0 -1
  149. package/dist/es/tools/outdent.d.ts +0 -44
  150. package/dist/es/tools/outdent.js +0 -123
  151. package/dist/es/tools/pdf.d.ts +0 -58
  152. package/dist/es/tools/pdf.js +0 -100
  153. package/dist/es/tools/print.d.ts +0 -49
  154. package/dist/es/tools/print.js +0 -103
  155. package/dist/es/tools/proseMirrorTool.d.ts +0 -48
  156. package/dist/es/tools/proseMirrorTool.js +0 -104
  157. package/dist/es/tools/selectAll.d.ts +0 -49
  158. package/dist/es/tools/selectAll.js +0 -97
  159. package/dist/es/tools/tableEdit.d.ts +0 -51
  160. package/dist/es/tools/tableEdit.js +0 -34
  161. package/dist/es/tools/unlink.d.ts +0 -47
  162. package/dist/es/tools/unlink.js +0 -104
  163. package/dist/es/tools/utils.d.ts +0 -18
  164. package/dist/es/tools/utils.js +0 -31
  165. package/dist/es/tools/viewHtml.d.ts +0 -54
  166. package/dist/es/tools/viewHtml.js +0 -121
  167. package/dist/es/utils/browser-detection.d.ts +0 -4
  168. package/dist/es/utils/browser-detection.js +0 -5
  169. package/dist/es/utils/controlled-value.d.ts +0 -5
  170. package/dist/es/utils/controlled-value.js +0 -31
  171. package/dist/es/utils/main.d.ts +0 -357
  172. package/dist/es/utils/main.js +0 -422
  173. package/dist/es/utils/props-key.d.ts +0 -5
  174. package/dist/es/utils/props-key.js +0 -5
  175. package/dist/esm/Editor.d.ts +0 -283
  176. package/dist/esm/Editor.js +0 -812
  177. package/dist/esm/EditorProps.d.ts +0 -194
  178. package/dist/esm/EditorProps.js +0 -1
  179. package/dist/esm/additionalTypes.ts +0 -21
  180. package/dist/esm/config/defaultStyles.d.ts +0 -12
  181. package/dist/esm/config/defaultStyles.js +0 -12
  182. package/dist/esm/config/pasteSettings.d.ts +0 -6
  183. package/dist/esm/config/pasteSettings.js +0 -1
  184. package/dist/esm/config/schema.d.ts +0 -8
  185. package/dist/esm/config/schema.js +0 -51
  186. package/dist/esm/config/shortcuts.d.ts +0 -24
  187. package/dist/esm/config/shortcuts.js +0 -61
  188. package/dist/esm/config/toolsSettings.d.ts +0 -489
  189. package/dist/esm/config/toolsSettings.js +0 -528
  190. package/dist/esm/dialogs/EditorDialogProps.d.ts +0 -23
  191. package/dist/esm/dialogs/EditorDialogProps.js +0 -1
  192. package/dist/esm/dialogs/FindReplace.d.ts +0 -70
  193. package/dist/esm/dialogs/FindReplace.js +0 -909
  194. package/dist/esm/dialogs/insertImage.d.ts +0 -54
  195. package/dist/esm/dialogs/insertImage.js +0 -1164
  196. package/dist/esm/dialogs/insertLink.d.ts +0 -52
  197. package/dist/esm/dialogs/insertLink.js +0 -826
  198. package/dist/esm/dialogs/main.d.ts +0 -1
  199. package/dist/esm/dialogs/main.js +0 -42
  200. package/dist/esm/dialogs/viewHtml.d.ts +0 -51
  201. package/dist/esm/dialogs/viewHtml.js +0 -201
  202. package/dist/esm/main.d.ts +0 -192
  203. package/dist/esm/main.js +0 -217
  204. package/dist/esm/messages/main.d.ts +0 -172
  205. package/dist/esm/messages/main.js +0 -503
  206. package/dist/esm/package-metadata.d.ts +0 -5
  207. package/dist/esm/package-metadata.js +0 -11
  208. package/dist/esm/package.json +0 -3
  209. package/dist/esm/tools/ToolProps.d.ts +0 -35
  210. package/dist/esm/tools/ToolProps.js +0 -1
  211. package/dist/esm/tools/align.d.ts +0 -42
  212. package/dist/esm/tools/align.js +0 -111
  213. package/dist/esm/tools/applyColor.d.ts +0 -45
  214. package/dist/esm/tools/applyColor.js +0 -100
  215. package/dist/esm/tools/cleanFormatting.d.ts +0 -49
  216. package/dist/esm/tools/cleanFormatting.js +0 -107
  217. package/dist/esm/tools/findReplace.d.ts +0 -43
  218. package/dist/esm/tools/findReplace.js +0 -115
  219. package/dist/esm/tools/fontStyle.d.ts +0 -55
  220. package/dist/esm/tools/fontStyle.js +0 -150
  221. package/dist/esm/tools/formatBlock.d.ts +0 -45
  222. package/dist/esm/tools/formatBlock.js +0 -145
  223. package/dist/esm/tools/history.d.ts +0 -18
  224. package/dist/esm/tools/history.js +0 -3
  225. package/dist/esm/tools/indent.d.ts +0 -44
  226. package/dist/esm/tools/indent.js +0 -121
  227. package/dist/esm/tools/inlineFormat.d.ts +0 -74
  228. package/dist/esm/tools/inlineFormat.js +0 -120
  229. package/dist/esm/tools/insertImage.d.ts +0 -46
  230. package/dist/esm/tools/insertImage.js +0 -126
  231. package/dist/esm/tools/insertLink.d.ts +0 -46
  232. package/dist/esm/tools/insertLink.js +0 -126
  233. package/dist/esm/tools/insertTable/popup.d.ts +0 -80
  234. package/dist/esm/tools/insertTable/popup.js +0 -177
  235. package/dist/esm/tools/insertTable/popupGrid.d.ts +0 -51
  236. package/dist/esm/tools/insertTable/popupGrid.js +0 -131
  237. package/dist/esm/tools/insertTable/tool.d.ts +0 -53
  238. package/dist/esm/tools/insertTable/tool.js +0 -157
  239. package/dist/esm/tools/lists.d.ts +0 -48
  240. package/dist/esm/tools/lists.js +0 -124
  241. package/dist/esm/tools/main.d.ts +0 -95
  242. package/dist/esm/tools/main.js +0 -1
  243. package/dist/esm/tools/outdent.d.ts +0 -44
  244. package/dist/esm/tools/outdent.js +0 -123
  245. package/dist/esm/tools/pdf.d.ts +0 -58
  246. package/dist/esm/tools/pdf.js +0 -100
  247. package/dist/esm/tools/print.d.ts +0 -49
  248. package/dist/esm/tools/print.js +0 -103
  249. package/dist/esm/tools/proseMirrorTool.d.ts +0 -48
  250. package/dist/esm/tools/proseMirrorTool.js +0 -104
  251. package/dist/esm/tools/selectAll.d.ts +0 -49
  252. package/dist/esm/tools/selectAll.js +0 -97
  253. package/dist/esm/tools/tableEdit.d.ts +0 -51
  254. package/dist/esm/tools/tableEdit.js +0 -34
  255. package/dist/esm/tools/unlink.d.ts +0 -47
  256. package/dist/esm/tools/unlink.js +0 -104
  257. package/dist/esm/tools/utils.d.ts +0 -18
  258. package/dist/esm/tools/utils.js +0 -31
  259. package/dist/esm/tools/viewHtml.d.ts +0 -54
  260. package/dist/esm/tools/viewHtml.js +0 -121
  261. package/dist/esm/utils/browser-detection.d.ts +0 -4
  262. package/dist/esm/utils/browser-detection.js +0 -5
  263. package/dist/esm/utils/controlled-value.d.ts +0 -5
  264. package/dist/esm/utils/controlled-value.js +0 -31
  265. package/dist/esm/utils/main.d.ts +0 -357
  266. package/dist/esm/utils/main.js +0 -422
  267. package/dist/esm/utils/props-key.d.ts +0 -5
  268. package/dist/esm/utils/props-key.js +0 -5
  269. package/dist/npm/Editor.d.ts +0 -283
  270. package/dist/npm/Editor.js +0 -819
  271. package/dist/npm/EditorProps.d.ts +0 -194
  272. package/dist/npm/EditorProps.js +0 -2
  273. package/dist/npm/additionalTypes.ts +0 -21
  274. package/dist/npm/config/defaultStyles.d.ts +0 -12
  275. package/dist/npm/config/defaultStyles.js +0 -15
  276. package/dist/npm/config/pasteSettings.d.ts +0 -6
  277. package/dist/npm/config/pasteSettings.js +0 -2
  278. package/dist/npm/config/schema.d.ts +0 -8
  279. package/dist/npm/config/schema.js +0 -55
  280. package/dist/npm/config/shortcuts.d.ts +0 -24
  281. package/dist/npm/config/shortcuts.js +0 -68
  282. package/dist/npm/config/toolsSettings.d.ts +0 -489
  283. package/dist/npm/config/toolsSettings.js +0 -531
  284. package/dist/npm/dialogs/EditorDialogProps.d.ts +0 -23
  285. package/dist/npm/dialogs/EditorDialogProps.js +0 -2
  286. package/dist/npm/dialogs/FindReplace.d.ts +0 -70
  287. package/dist/npm/dialogs/FindReplace.js +0 -916
  288. package/dist/npm/dialogs/insertImage.d.ts +0 -54
  289. package/dist/npm/dialogs/insertImage.js +0 -1171
  290. package/dist/npm/dialogs/insertLink.d.ts +0 -52
  291. package/dist/npm/dialogs/insertLink.js +0 -833
  292. package/dist/npm/dialogs/main.d.ts +0 -1
  293. package/dist/npm/dialogs/main.js +0 -42
  294. package/dist/npm/dialogs/viewHtml.d.ts +0 -51
  295. package/dist/npm/dialogs/viewHtml.js +0 -208
  296. package/dist/npm/main.d.ts +0 -192
  297. package/dist/npm/main.js +0 -217
  298. package/dist/npm/messages/main.d.ts +0 -172
  299. package/dist/npm/messages/main.js +0 -506
  300. package/dist/npm/package-metadata.d.ts +0 -5
  301. package/dist/npm/package-metadata.js +0 -14
  302. package/dist/npm/tools/ToolProps.d.ts +0 -35
  303. package/dist/npm/tools/ToolProps.js +0 -2
  304. package/dist/npm/tools/align.d.ts +0 -42
  305. package/dist/npm/tools/align.js +0 -118
  306. package/dist/npm/tools/applyColor.d.ts +0 -45
  307. package/dist/npm/tools/applyColor.js +0 -107
  308. package/dist/npm/tools/cleanFormatting.d.ts +0 -49
  309. package/dist/npm/tools/cleanFormatting.js +0 -114
  310. package/dist/npm/tools/findReplace.d.ts +0 -43
  311. package/dist/npm/tools/findReplace.js +0 -122
  312. package/dist/npm/tools/fontStyle.d.ts +0 -55
  313. package/dist/npm/tools/fontStyle.js +0 -157
  314. package/dist/npm/tools/formatBlock.d.ts +0 -45
  315. package/dist/npm/tools/formatBlock.js +0 -152
  316. package/dist/npm/tools/history.d.ts +0 -18
  317. package/dist/npm/tools/history.js +0 -8
  318. package/dist/npm/tools/indent.d.ts +0 -44
  319. package/dist/npm/tools/indent.js +0 -128
  320. package/dist/npm/tools/inlineFormat.d.ts +0 -74
  321. package/dist/npm/tools/inlineFormat.js +0 -127
  322. package/dist/npm/tools/insertImage.d.ts +0 -46
  323. package/dist/npm/tools/insertImage.js +0 -133
  324. package/dist/npm/tools/insertLink.d.ts +0 -46
  325. package/dist/npm/tools/insertLink.js +0 -133
  326. package/dist/npm/tools/insertTable/popup.d.ts +0 -80
  327. package/dist/npm/tools/insertTable/popup.js +0 -184
  328. package/dist/npm/tools/insertTable/popupGrid.d.ts +0 -51
  329. package/dist/npm/tools/insertTable/popupGrid.js +0 -138
  330. package/dist/npm/tools/insertTable/tool.d.ts +0 -53
  331. package/dist/npm/tools/insertTable/tool.js +0 -164
  332. package/dist/npm/tools/lists.d.ts +0 -48
  333. package/dist/npm/tools/lists.js +0 -131
  334. package/dist/npm/tools/main.d.ts +0 -95
  335. package/dist/npm/tools/main.js +0 -5
  336. package/dist/npm/tools/outdent.d.ts +0 -44
  337. package/dist/npm/tools/outdent.js +0 -130
  338. package/dist/npm/tools/pdf.d.ts +0 -58
  339. package/dist/npm/tools/pdf.js +0 -107
  340. package/dist/npm/tools/print.d.ts +0 -49
  341. package/dist/npm/tools/print.js +0 -110
  342. package/dist/npm/tools/proseMirrorTool.d.ts +0 -48
  343. package/dist/npm/tools/proseMirrorTool.js +0 -111
  344. package/dist/npm/tools/selectAll.d.ts +0 -49
  345. package/dist/npm/tools/selectAll.js +0 -104
  346. package/dist/npm/tools/tableEdit.d.ts +0 -51
  347. package/dist/npm/tools/tableEdit.js +0 -39
  348. package/dist/npm/tools/unlink.d.ts +0 -47
  349. package/dist/npm/tools/unlink.js +0 -111
  350. package/dist/npm/tools/utils.d.ts +0 -18
  351. package/dist/npm/tools/utils.js +0 -39
  352. package/dist/npm/tools/viewHtml.d.ts +0 -54
  353. package/dist/npm/tools/viewHtml.js +0 -128
  354. package/dist/npm/utils/browser-detection.d.ts +0 -4
  355. package/dist/npm/utils/browser-detection.js +0 -8
  356. package/dist/npm/utils/controlled-value.d.ts +0 -5
  357. package/dist/npm/utils/controlled-value.js +0 -35
  358. package/dist/npm/utils/main.d.ts +0 -357
  359. package/dist/npm/utils/main.js +0 -425
  360. package/dist/npm/utils/props-key.d.ts +0 -5
  361. package/dist/npm/utils/props-key.js +0 -8
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.userSelectNone = exports.formatString = exports.onDownPreventDefault = void 0;
7
- /**
8
- * @hidden
9
- */
10
- var onDownPreventDefault = {
11
- onMouseDown: function onMouseDown(e) {
12
- return e.preventDefault();
13
- },
14
- onPointerDown: function onPointerDown(e) {
15
- return e.preventDefault();
16
- }
17
- };
18
- exports.onDownPreventDefault = onDownPreventDefault;
19
- /**
20
- * @hidden
21
- */
22
- var userSelectNone = {
23
- userSelect: 'none'
24
- };
25
- exports.userSelectNone = userSelectNone;
26
- /**
27
- * @hidden
28
- */
29
- var formatString = function formatString(input) {
30
- var args = [];
31
- for (var _i = 1; _i < arguments.length; _i++) {
32
- args[_i - 1] = arguments[_i];
33
- }
34
- args.forEach(function (value, index) {
35
- input = input.replace('{' + index + '}', String(value));
36
- });
37
- return input;
38
- };
39
- exports.formatString = formatString;
@@ -1,54 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
2
- declare type DefaultData<V> = object | ((this: V) => {});
3
- declare type DefaultMethods<V> = {
4
- [key: string]: (this: V, ...args: any[]) => any;
5
- };
6
- import { ButtonProps } from '@progress/kendo-vue-buttons';
7
- import { BasicToolProps, ToolRenderProp } from './ToolProps';
8
- /**
9
- * @hidden
10
- */
11
- export interface ViewHtmlProps extends BasicToolProps, ToolRenderProp, ButtonProps {
12
- }
13
- /**
14
- * @hidden
15
- */
16
- export interface ViewHtmlState {
17
- openedDialog: boolean;
18
- }
19
- /**
20
- * @hidden
21
- */
22
- export interface ViewHtmlState {
23
- }
24
- /**
25
- * @hidden
26
- */
27
- export interface ViewHtmlComputed {
28
- [key: string]: any;
29
- }
30
- /**
31
- * @hidden
32
- */
33
- export interface ViewHtmlMethods {
34
- [key: string]: any;
35
- }
36
- /**
37
- * @hidden
38
- */
39
- export interface ViewHtmlData {
40
- }
41
- /**
42
- * @hidden
43
- */
44
- export interface ViewHtmlAll extends Vue2type, ViewHtmlMethods, ViewHtmlData, ViewHtmlComputed, ViewHtmlState {
45
- }
46
- /**
47
- * @hidden
48
- */
49
- declare let ViewHtmlVue2: ComponentOptions<ViewHtmlAll, DefaultData<ViewHtmlData>, DefaultMethods<ViewHtmlAll>, ViewHtmlComputed, RecordPropsDefinition<ViewHtmlProps>>;
50
- /**
51
- * @hidden
52
- */
53
- declare const ViewHtml: DefineComponent<ViewHtmlProps, any, ViewHtmlData, ViewHtmlComputed, ViewHtmlMethods, {}, {}, {}, string, ViewHtmlProps, ViewHtmlProps, {}>;
54
- export { ViewHtml, ViewHtmlVue2 };
@@ -1,128 +0,0 @@
1
- "use strict";
2
-
3
- var __assign = undefined && undefined.__assign || function () {
4
- __assign = Object.assign || function (t) {
5
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6
- s = arguments[i];
7
- for (var p in s) {
8
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
9
- }
10
- }
11
- return t;
12
- };
13
- return __assign.apply(this, arguments);
14
- };
15
- var __rest = undefined && undefined.__rest || function (s, e) {
16
- var t = {};
17
- for (var p in s) {
18
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
19
- }
20
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
21
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
22
- }
23
- return t;
24
- };
25
- Object.defineProperty(exports, "__esModule", {
26
- value: true
27
- });
28
- exports.ViewHtmlVue2 = exports.ViewHtml = void 0;
29
- // @ts-ignore
30
- var Vue = require("vue");
31
- var allVue = Vue;
32
- var gh = allVue.h;
33
- var isV3 = allVue.version && allVue.version[0] === '3';
34
- var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
35
- var viewHtml_1 = require("../dialogs/viewHtml");
36
- var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
37
- var main_1 = require("../messages/main");
38
- /**
39
- * @hidden
40
- */
41
- var ViewHtmlVue2 = {
42
- name: 'KendoViewHtml',
43
- props: __assign({
44
- view: Object,
45
- settings: {
46
- type: Object,
47
- default: function _default() {
48
- return {
49
- messages: {}
50
- };
51
- }
52
- }
53
- }, kendo_vue_buttons_1.Button.props),
54
- inject: {
55
- kendoLocalizationService: {
56
- default: null
57
- }
58
- },
59
- data: function data() {
60
- return {
61
- openedDialog: false
62
- };
63
- },
64
- // @ts-ignore
65
- setup: !isV3 ? undefined : function () {
66
- var v3 = !!isV3;
67
- return {
68
- v3: v3
69
- };
70
- },
71
- // @ts-ignore
72
- render: function render(createElement) {
73
- var h = gh || createElement;
74
- var _a = this.$props,
75
- view = _a.view,
76
- settings = _a.settings,
77
- other = __rest(_a, ["view", "settings"]);
78
- var localization = (0, kendo_vue_intl_1.provideLocalizationService)(this);
79
- var titleKey = settings.messages.viewHtml;
80
- var buttonProps = __assign(__assign(__assign({}, other), {
81
- key: 'viewHtml',
82
- title: localization.toLanguageString(titleKey, main_1.messages[titleKey])
83
- }), settings.props);
84
- var button = h(kendo_vue_buttons_1.Button, __assign({
85
- onClick: this.toggleDialog,
86
- onMousedown: this.preventDefault,
87
- onPointerdown: this.preventDefault,
88
- on: this.v3 ? undefined : {
89
- 'click': this.toggleDialog,
90
- 'mousedown': this.preventDefault,
91
- 'pointerdown': this.preventDefault
92
- },
93
- attrs: this.v3 ? undefined : buttonProps
94
- }, buttonProps));
95
- var rendering = [button, this.openedDialog && view &&
96
- // @ts-ignore function children
97
- h(viewHtml_1.ViewHtmlDialog, {
98
- key: "viewHtmlDialog",
99
- view: view,
100
- attrs: this.v3 ? undefined : {
101
- view: view,
102
- settings: settings,
103
- dir: buttonProps.dir
104
- },
105
- settings: settings,
106
- dir: buttonProps.dir,
107
- onClose: this.toggleDialog,
108
- on: this.v3 ? undefined : {
109
- "close": this.toggleDialog
110
- }
111
- }) || null];
112
- return h("span", [rendering]);
113
- },
114
- methods: {
115
- toggleDialog: function toggleDialog() {
116
- this.openedDialog = !this.openedDialog;
117
- },
118
- preventDefault: function preventDefault(e) {
119
- e.preventDefault();
120
- }
121
- }
122
- };
123
- exports.ViewHtmlVue2 = ViewHtmlVue2;
124
- /**
125
- * @hidden
126
- */
127
- var ViewHtml = ViewHtmlVue2;
128
- exports.ViewHtml = ViewHtml;
@@ -1,4 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export declare const firefox: boolean;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.firefox = void 0;
4
- /**
5
- * @hidden
6
- */
7
- exports.firefox = typeof window !== 'undefined' &&
8
- /Firefox/.test(window.navigator.userAgent);
@@ -1,5 +0,0 @@
1
- import { Transaction, EditorView, Node } from '@progress/kendo-editor-common';
2
- /**
3
- * @hidden
4
- */
5
- export declare const updateEditorValue: (view: EditorView, value: Node | string, prevValue: Node | string | undefined, trOnChange: Transaction | null, htmlOnChange: string | null) => void;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateEditorValue = void 0;
4
- var kendo_editor_common_1 = require("@progress/kendo-editor-common");
5
- var main_1 = require("./main");
6
- var setValue = function (view, value) {
7
- var transaction = value.tr ||
8
- (view.state.tr
9
- .setSelection(new kendo_editor_common_1.AllSelection(view.state.doc))
10
- .replaceSelectionWith(value.doc || main_1.EditorUtils.createDocument(view.state.schema, value.html || ''))
11
- .setMeta('commandName', 'setHTML'));
12
- view.updateState(view.state.apply(transaction));
13
- };
14
- /**
15
- * @hidden
16
- */
17
- var updateEditorValue = function (view, value, prevValue, trOnChange, htmlOnChange) {
18
- if (typeof value === 'string') {
19
- if (trOnChange && value === htmlOnChange) {
20
- setValue(view, { tr: trOnChange });
21
- }
22
- else if (value !== prevValue) {
23
- setValue(view, { html: value });
24
- }
25
- }
26
- else {
27
- if (trOnChange && value.eq(trOnChange.doc)) {
28
- setValue(view, { tr: trOnChange });
29
- }
30
- else if (!view.state.doc.eq(value)) {
31
- setValue(view, { doc: value });
32
- }
33
- }
34
- };
35
- exports.updateEditorValue = updateEditorValue;
@@ -1,357 +0,0 @@
1
- import * as shortcuts from '../config/shortcuts';
2
- import { ImageResizeOptions as ImageResizeOptionsCommon, Schema, NodeSpec, MarkSpec, Node, NodeType, Mark, MarkType, ParseOptions, EditorView, EditorState, Transaction, Plugin, PluginKey } from '@progress/kendo-editor-common';
3
- import { EditorToolsSettings } from '../config/toolsSettings';
4
- import { PasteCleanupSettings } from '../config/pasteSettings';
5
- /**
6
- * Represents a wrapping namespace for the utility functions, `nodes`, and `marks` objects of the Editor.
7
- */
8
- export declare namespace EditorUtils {
9
- /**
10
- * Aligns the block elements in the selection.
11
- *
12
- * @returns {boolean} - If alignment is applied to any of the elements, returns `true`.
13
- */
14
- function alignBlocks(view: EditorView, actions: EditorToolsSettings.AlignAction[], command?: EditorToolsSettings.Command): boolean;
15
- /**
16
- * Wraps the selection in a `span` element with inline styles.
17
- *
18
- * @returns {boolean} - If a style is applied to any of the elements, returns `true`.
19
- */
20
- function applyInlineStyle(view: EditorView, options: {
21
- style: string;
22
- value: string;
23
- }, command?: EditorToolsSettings.Command): boolean;
24
- /**
25
- * Applies the link mark.
26
- *
27
- * @returns {boolean} - If the link is applied, returns `true`.
28
- */
29
- function applyLink(view: any, options: {
30
- mark: string;
31
- attrs: any;
32
- }, command?: EditorToolsSettings.Command): boolean;
33
- /**
34
- * Checks if any of the `list` elements in the selection can be indented.
35
- *
36
- * @returns {boolean}
37
- */
38
- function canIndentList(state: EditorState, nodeType: NodeType): boolean;
39
- /**
40
- * Checks if a node can be inserted in the current selection.
41
- *
42
- * @param {EditorState} state - The `state` object of the Editor.
43
- * @param {NodeType} nodeType - The type of the node that will be inserted.
44
- * @returns {boolean} - The node of this type can be inserted in the current selection.
45
- */
46
- function canInsert(state: EditorState, nodeType: NodeType): boolean;
47
- /**
48
- * Checks if any of the `list` elements in the selection can be outdented.
49
- *
50
- * @returns {boolean}
51
- */
52
- function canOutdentList(state: EditorState, listsTypes: {
53
- listItem: string;
54
- orderedList: string;
55
- bulletList: string;
56
- }): boolean;
57
- /**
58
- * Converts the MS Word lists into HTML lists.
59
- *
60
- * @param {string} html - The input HTML.
61
- * @returns {string} - The result HTML.
62
- */
63
- function convertMsLists(html: string): string;
64
- /**
65
- * Creates an Editor document from HTML content.
66
- *
67
- * @param {Schema} schema - The `schema` object of the Editor.
68
- * @param {string} html - The HTML content.
69
- * @param {ParseOptions} parseOptions - The HTML parsing options. Defaults to `{ preserveWhitespace: 'full' }`.
70
- * @returns {Node} - The `document` object of the Editor.
71
- */
72
- function createDocument(schema: Schema<any, any>, html: string, parseOptions?: ParseOptions): Node;
73
- /**
74
- * Creates a table.
75
- *
76
- * @param {object} tableTypes - An object which contains `table`, `table_row`, and `table_cell` node types.
77
- * @param {number} rows - The number of rows.
78
- * @param {number} columns - The number of columns.
79
- * @returns {Node} - The generated table.
80
- *
81
- * @example
82
- * ```jsx-no-run
83
- * import { EditorUtils } from '@progress/kendo-vue-editor';
84
- *
85
- * const nodes = editorRef.view.state.schema.nodes;
86
- * const rows = 3;
87
- * const columns = 4;
88
- *
89
- * const table = EditorUtils.createTable(nodes, rows, columns);
90
- * ```
91
- */
92
- function createTable(tableTypes: {
93
- table: NodeType;
94
- table_row: NodeType;
95
- table_cell: NodeType;
96
- }, rows: number, columns: number): Node;
97
- /**
98
- * Formats the paragraph and heading nodes in the selection.
99
- *
100
- * @returns {boolean} - If an element is formatted, returns `true`.
101
- */
102
- function formatBlockElements(view: EditorView, value: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6', commandName?: EditorToolsSettings.Command): boolean;
103
- /**
104
- * Returns the paragraph and heading nodes in the selection.
105
- *
106
- * @returns {string[]}
107
- */
108
- function getBlockFormats(state: EditorState): string[];
109
- /**
110
- * Gets the HTML from the `EditorState` object.
111
- *
112
- * @param {EditorState} state - The `state` object of the Editor or an object containing editor's `doc` and `schema`
113
- * - { doc: value, schema: value.types.schema } where the `value` variable is the editor's value prop.
114
- * @returns {string} - The HTML content.
115
- */
116
- function getHtml(state: EditorState | {
117
- doc: Node;
118
- schema: Schema;
119
- }): string;
120
- /**
121
- * @returns {string[]} - An array of matched styles that are found in the selection.
122
- */
123
- function getInlineStyles(state: EditorState, style: {
124
- name: string;
125
- value: RegExp;
126
- }): string[];
127
- /**
128
- * Returns a mark of the specified type from the nodes in selection.
129
- *
130
- * @returns {Mark}
131
- */
132
- function getMark(state: EditorState, markType: MarkType): Mark | undefined;
133
- /**
134
- * Checks if according to the specified `InlineFormatOptions` a node in the selection is present.
135
- *
136
- * @returns {boolean}
137
- */
138
- function hasMark(state: EditorState, options: EditorToolsSettings.InlineFormatOptions): boolean;
139
- /**
140
- * Checks if the selection contains a specific type of node.
141
- *
142
- * @returns {boolean}
143
- */
144
- function hasNode(state: EditorState, nodeType: NodeType): boolean;
145
- /**
146
- * Indents the block elements in the selection.
147
- *
148
- * @returns {boolean} - If indentation is applied to any of the elements, returns `true`.
149
- */
150
- function indentBlocks(view: EditorView, actions: EditorToolsSettings.IndentAction[], command?: EditorToolsSettings.Command, dir?: string): boolean;
151
- /**
152
- * Adds new lines after block elements and hard breaks.
153
- *
154
- * @param {string} content - The HTML content.
155
- * @returns {string} - The indented HTML.
156
- */
157
- function indentHtml(content: string): string;
158
- /**
159
- * Inserts a node in the selection.
160
- *
161
- * @param {EditorView} view - The `view` object of the Editor.
162
- * @param {Node} node - A `node` object of the Editor.
163
- * @param {boolean} scrollIntoView - An optional parameter.
164
- * Defines if the content element will be scrolled to the current selection.
165
- */
166
- function insertNode(view: EditorView | {
167
- state: EditorState;
168
- dispatch: (tr: Transaction) => void;
169
- }, node: Node, scrollIntoView?: boolean | undefined): void;
170
- /**
171
- * Checks if any of the block elements in the selection is aligned.
172
- *
173
- * @returns {boolean}
174
- */
175
- function isAligned(state: EditorState, actions: EditorToolsSettings.AlignAction[]): boolean;
176
- /**
177
- * Checks if any of the block elements in the selection is indented.
178
- *
179
- * @returns {boolean}
180
- */
181
- function isIndented(state: any, actions: EditorToolsSettings.IndentAction[], dir?: string): boolean;
182
- /**
183
- * Removes the comments from the HTML.
184
- *
185
- * @param {string} html - The input HTML.
186
- * @returns {string} - The result HTML.
187
- *
188
- * @example
189
- * ```jsx-no-run
190
- * import { EditorUtils } from '@progress/kendo-vue-editor';
191
- * const html = EditorUtils.removeComments('<p>some content<!-- comment --></p>');
192
- * ```
193
- */
194
- function removeComments(html: string): string;
195
- /**
196
- * Removes the specified tag from the HTML and keeps its child nodes.
197
- *
198
- * @param {string} html - The input HTML.
199
- * @param {string} tag - A tag or multiple tags separated by a vertical slash which will be removed.
200
- * For example, `span` or `b|i|u|span`.
201
- * @returns {string} - The resulting HTML.
202
- *
203
- * @example
204
- * ```jsx-no-run
205
- * import { EditorUtils } from '@progress/kendo-vue-editor';
206
- * const html = EditorUtils.removeTag('<p>some <span>content</span></p>', 'span|p');
207
- * ```
208
- */
209
- function removeTag(html: string, tag: string): string;
210
- /**
211
- * A function for sanitizing the content on paste ([see example]({% slug paste_editor %})).
212
- *
213
- * @param {string} html - The input HTML.
214
- * @param {PasteCleanupSettings} settings - The settings used for sanitizing the content.
215
- * @returns {string} - The resulting HTML.
216
- */
217
- function pasteCleanup(html: string, settings: PasteCleanupSettings): string;
218
- /**
219
- * A function for sanitizing the CSS classes of the pasted from MS Word content ([see example]({% slug paste_editor %})).
220
- * The function will remove any class attribute which value starts with `Mso`.
221
- * For example `<p class="MsoNormal">pasted from MS Word</p>` will result in `<p>pasted from MS Word</p>`.
222
- *
223
- * @param {Attr} attr - The DOM class attribute that will be sanitized.
224
- */
225
- function sanitizeClassAttr(attr: Attr): void;
226
- /**
227
- * A function for sanitizing the style attributes of the pasted from MS Word content ([see example]({% slug paste_editor %})).
228
- * The function will loop through all styles and will remove those that are invalid.
229
- * For example `<p><span style='color:#7C7C7C;mso-themecolor:accent3;mso-themeshade:191;background:silver;'>content</span></p>`,
230
- * will result in `<p><span style="color: #7C7C7C; background: silver;">content</span></p>`.
231
- *
232
- * @param {Attr} attr - The DOM style attribute that will be sanitized.
233
- */
234
- function sanitizeStyleAttr(attr: Attr): void;
235
- /**
236
- * A function that will remove a DOM attribute from the pasted content ([see example]({% slug paste_editor %})).
237
- *
238
- * @param {Attr} attr - The DOM attribute that will be removed.
239
- */
240
- function removeAttribute(attr: Attr): void;
241
- /**
242
- * Removes the invalid HTML.
243
- *
244
- * @param {string} html - The HTML which will be sanitized.
245
- * @returns {string} - The sanitized HTML.
246
- *
247
- * @example
248
- * ```jsx-no-run
249
- * import { EditorUtils } from '@progress/kendo-vue-editor';
250
- * const html = EditorUtils.sanitize('something pasted from MS Word, containing <o:p>, <w:sdtPr>, <v:shapes tags');
251
- * ```
252
- */
253
- function sanitize(html: string): string;
254
- /**
255
- * If the input `html` contains images with 'src' pointing to local file system (it happens when pasting images and text from MS Word),
256
- * the function will extract the images sources from the RTF in base64 format and replace them in the input `html`.
257
- *
258
- * @param html - The input HTML (pasted HTML).
259
- * @param clipboardData - The paste event clipboardData object (event.clipboardData).
260
- * @returns - The html with the replaced images sources.
261
- */
262
- function replaceImageSourcesFromRtf(html: string, clipboardData: DataTransfer): string;
263
- /**
264
- * Creates a plugin which highlights the matches of Find and Replace dialog.
265
- *
266
- * @param {PluginKey} key - The key of the plugin (Optional).
267
- * @returns {Plugin} - The text highlight plugin.
268
- */
269
- function textHighlight(key?: PluginKey): Plugin;
270
- /**
271
- * The image resizing plugin options.
272
- */
273
- interface ImageResizeOptions extends ImageResizeOptionsCommon {
274
- }
275
- /**
276
- * Creates a plugin which adds image resizing functionality.
277
- *
278
- * @param {ImageResizeOptions} options - The resizing option (Optional).
279
- * @returns {Plugin} - The image resizing plugin.
280
- */
281
- function imageResizing(options?: ImageResizeOptions): Plugin;
282
- /**
283
- * Sets the HTML to the `EditorView`.
284
- *
285
- * @param {EditorView} view - The `view` object of the Editor.
286
- * @param {string} html - The HTML content.
287
- * @param {Command} command - An optional parameter.
288
- * Defines the type of the command that will be set to the `setHtml` metadata of the transaction.
289
- * Defaults to `SetContent`.
290
- * @param {ParseOptions} parseOptions - An optional parameter.
291
- * Defines the options that will be used for parsing the HTML. Defaults to `{ preserveWhitespace: 'full' }`.
292
- */
293
- function setHtml(view: EditorView, html: string, command?: EditorToolsSettings.Command, parseOptions?: ParseOptions): void;
294
- /**
295
- * Toggles the inline element formatting according to the `InlineFormatOptions` and `markAttrs` settings.
296
- *
297
- * @returns {boolean}
298
- */
299
- function toggleInlineFormat(view: {
300
- state: EditorState;
301
- dispatch: (tr: Transaction) => void;
302
- }, options: EditorToolsSettings.InlineFormatOptions, transaction?: Transaction, markAttrs?: any): boolean;
303
- /**
304
- * Toggles a list of the specified type.
305
- *
306
- * @returns {boolean}
307
- */
308
- function toggleList(view: EditorView, types: {
309
- listType: string;
310
- orderedList: string;
311
- bulletList: string;
312
- listItem: string;
313
- }, command?: EditorToolsSettings.Command): boolean;
314
- /**
315
- * Represents the `Shortcuts` object.
316
- */
317
- interface Shortcuts extends shortcuts.Shortcuts {
318
- }
319
- /**
320
- * A function which returns the mapped `Shortcuts` object based on the passed settings.
321
- * Useful when the default Editor nodes or tool settings are changed and the `Shortcuts` object has to be regenerated.
322
- *
323
- * @params - An object which holds specific types of nodes and tool settings that are used by the default `Shortcuts` handlers.
324
- * @returns - An object which holds the shortcuts.
325
- */
326
- function getShortcuts(settings?: {
327
- types?: {
328
- listItem: string;
329
- hardBreak: string;
330
- };
331
- toolsSettings?: {
332
- bold?: EditorToolsSettings.InlineFormatOptions;
333
- italic?: EditorToolsSettings.InlineFormatOptions;
334
- underline?: EditorToolsSettings.InlineFormatOptions;
335
- };
336
- }): Shortcuts;
337
- /**
338
- * The `PluginKey` used in the Editor to pass editor props to the tools.
339
- */
340
- const propsKey: PluginKey;
341
- /**
342
- * The `PluginKey` used in the Editor by the image resizing plugin.
343
- */
344
- const imageResizeKey: PluginKey;
345
- /**
346
- * Represents the `marks` object of the Editor.
347
- */
348
- const marks: {
349
- [mark: string]: MarkSpec;
350
- };
351
- /**
352
- * Represents the `nodes` object of the Editor.
353
- */
354
- const nodes: {
355
- [node: string]: NodeSpec;
356
- };
357
- }