@progress/kendo-angular-editor 3.1.2 → 4.0.0-dev.202204140850

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 (442) hide show
  1. package/bundles/kendo-angular-editor.umd.js +5 -0
  2. package/{dist/es2015/common → common}/active-marks.d.ts +0 -0
  3. package/{dist/es2015/common → common}/apply-to-word-options.d.ts +0 -0
  4. package/{dist/es2015/common → common}/commands.d.ts +0 -0
  5. package/{dist/es2015/common → common}/direction.d.ts +0 -0
  6. package/{dist/es2015/common → common}/error-messages.d.ts +0 -0
  7. package/{dist/es2015/common → common}/font-family-item.interface.d.ts +0 -0
  8. package/{dist/es2015/common → common}/font-size-item.interface.d.ts +0 -0
  9. package/{dist/es2015/common → common}/format-item.interface.d.ts +0 -0
  10. package/{dist/es2015/common → common}/image-data.interface.d.ts +0 -0
  11. package/{dist/es2015/common → common}/link-data.interface.d.ts +0 -0
  12. package/{dist/es2015/common → common}/paste-cleanup-settings.d.ts +0 -0
  13. package/{dist/es2015/common → common}/plugins-function.d.ts +0 -1
  14. package/{dist/es2015/common → common}/predicate.d.ts +0 -0
  15. package/common/provider.service.d.ts +14 -0
  16. package/{dist/es2015/common → common}/resizable-options.interface.d.ts +0 -0
  17. package/{dist/es2015/common → common}/styles.d.ts +0 -0
  18. package/{dist/es2015/common → common}/table-data.interface.d.ts +0 -0
  19. package/{dist/es2015/config → config}/command-icons.d.ts +0 -0
  20. package/{dist/es2015/config → config}/commands.d.ts +0 -0
  21. package/{dist/es2015/config → config}/schema.d.ts +0 -0
  22. package/{dist/es2015/config → config}/semantic-nodes.d.ts +0 -0
  23. package/{dist/es2015/config → config}/table-commands.d.ts +0 -0
  24. package/{dist/es2015/config → config}/utils.d.ts +8 -8
  25. package/{dist/es2015/dialogs → dialogs}/colorpicker-dialog.component.d.ts +3 -0
  26. package/{dist/es2015/dialogs → dialogs}/file-link-dialog.component.d.ts +4 -1
  27. package/{dist/es2015/dialogs → dialogs}/font-family-dialog.component.d.ts +3 -0
  28. package/{dist/es2015/dialogs → dialogs}/font-size-dialog.component.d.ts +3 -0
  29. package/{dist/es2015/dialogs → dialogs}/format-dialog.component.d.ts +4 -1
  30. package/{dist/es2015/dialogs → dialogs}/image-dialog.component.d.ts +3 -0
  31. package/{dist/es2015/dialogs → dialogs}/insert-table-dialog.component.d.ts +5 -4
  32. package/{dist/es2015/dialogs → dialogs}/source-dialog.component.d.ts +3 -0
  33. package/{dist/es2015/editor-toolbar-state.d.ts → editor-toolbar-state.d.ts} +1 -1
  34. package/{dist/es2015/editor.component.d.ts → editor.component.d.ts} +32 -20
  35. package/editor.module.d.ts +113 -0
  36. package/{dist/es2015 → esm2015}/common/active-marks.js +1 -0
  37. package/{dist/es2015 → esm2015}/common/apply-to-word-options.js +1 -0
  38. package/{dist/es → esm2015}/common/commands.js +1 -0
  39. package/{dist/es2015 → esm2015}/common/direction.js +1 -0
  40. package/{dist/es2015 → esm2015}/common/error-messages.js +2 -5
  41. package/{dist/es → esm2015}/common/font-family-item.interface.js +1 -0
  42. package/{dist/es → esm2015}/common/font-size-item.interface.js +1 -0
  43. package/{dist/es → esm2015}/common/format-item.interface.js +1 -0
  44. package/{dist/es → esm2015}/common/image-data.interface.js +1 -0
  45. package/{dist/es → esm2015}/common/link-data.interface.js +1 -0
  46. package/{dist/es → esm2015}/common/paste-cleanup-settings.js +1 -0
  47. package/{dist/es → esm2015}/common/plugins-function.js +1 -0
  48. package/{dist/es → esm2015}/common/predicate.js +1 -0
  49. package/esm2015/common/provider.service.js +16 -0
  50. package/{dist/es → esm2015}/common/resizable-options.interface.js +1 -0
  51. package/{dist/es2015 → esm2015}/common/styles.js +0 -0
  52. package/{dist/es → esm2015}/common/table-data.interface.js +1 -0
  53. package/{dist/es2015 → esm2015}/config/command-icons.js +0 -0
  54. package/esm2015/config/commands.js +62 -0
  55. package/{dist/es2015 → esm2015}/config/schema.js +0 -0
  56. package/{dist/es2015 → esm2015}/config/semantic-nodes.js +1 -4
  57. package/{dist/es2015 → esm2015}/config/table-commands.js +0 -0
  58. package/{dist/es2015 → esm2015}/config/utils.js +1 -1
  59. package/esm2015/dialogs/colorpicker-dialog.component.js +117 -0
  60. package/esm2015/dialogs/file-link-dialog.component.js +209 -0
  61. package/esm2015/dialogs/font-family-dialog.component.js +106 -0
  62. package/esm2015/dialogs/font-size-dialog.component.js +106 -0
  63. package/esm2015/dialogs/format-dialog.component.js +106 -0
  64. package/{dist/es2015 → esm2015}/dialogs/image-dialog.component.js +60 -21
  65. package/esm2015/dialogs/insert-table-dialog.component.js +74 -0
  66. package/esm2015/dialogs/source-dialog.component.js +89 -0
  67. package/{dist/es2015 → esm2015}/editor-toolbar-state.js +0 -0
  68. package/{dist/es2015 → esm2015}/editor.component.js +331 -200
  69. package/{dist/es2015 → esm2015}/editor.module.js +205 -31
  70. package/{dist/es/common/active-marks.js → esm2015/kendo-angular-editor.js} +4 -0
  71. package/esm2015/localization/custom-messages.component.js +41 -0
  72. package/esm2015/localization/editor-localization.service.js +31 -0
  73. package/esm2015/localization/localized-messages.directive.js +32 -0
  74. package/esm2015/localization/messages.js +126 -0
  75. package/{dist/es2015/index.js → esm2015/main.js} +37 -47
  76. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  77. package/{dist/es → esm2015}/preventable-events/paste-event-data.js +1 -0
  78. package/{dist/es2015 → esm2015}/preventable-events/paste-event.js +1 -1
  79. package/esm2015/preventable-events/preventable-event.js +27 -0
  80. package/esm2015/tools/alignment/editor-align-center-button.directive.js +42 -0
  81. package/esm2015/tools/alignment/editor-align-justify-button.directive.js +42 -0
  82. package/esm2015/tools/alignment/editor-align-left-button.directive.js +42 -0
  83. package/esm2015/tools/alignment/editor-align-right-button.directive.js +42 -0
  84. package/esm2015/tools/blockquote/editor-blockquote-button.directive.js +41 -0
  85. package/esm2015/tools/colorpicker/editor-back-color.directive.js +28 -0
  86. package/esm2015/tools/colorpicker/editor-colorpicker.component.js +262 -0
  87. package/esm2015/tools/colorpicker/editor-fore-color.directive.js +28 -0
  88. package/esm2015/tools/editor-clean-formatting-button.directive.js +41 -0
  89. package/esm2015/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +104 -0
  90. package/{dist/es2015 → esm2015}/tools/fontfamily/editor-fontfamily.component.js +73 -57
  91. package/esm2015/tools/fontsize/editor-fontsize-dropdownlist.component.js +93 -0
  92. package/{dist/es2015 → esm2015}/tools/fontsize/editor-fontsize.component.js +72 -54
  93. package/esm2015/tools/format/editor-format-dropdownlist.component.js +160 -0
  94. package/{dist/es2015 → esm2015}/tools/format/editor-format.component.js +69 -51
  95. package/esm2015/tools/history/editor-redo-button.directive.js +42 -0
  96. package/esm2015/tools/history/editor-undo-button.directive.js +42 -0
  97. package/esm2015/tools/image/editor-insert-image-button.directive.js +41 -0
  98. package/esm2015/tools/indentation/editor-indent-button.directive.js +42 -0
  99. package/esm2015/tools/indentation/editor-outdent-button.directive.js +42 -0
  100. package/esm2015/tools/link/editor-create-link-button.directive.js +42 -0
  101. package/esm2015/tools/link/editor-insert-file-button.directive.js +34 -0
  102. package/esm2015/tools/link/editor-unlink-button.directive.js +42 -0
  103. package/esm2015/tools/list/editor-insert-ordered-list-button.directive.js +42 -0
  104. package/esm2015/tools/list/editor-insert-unordered-list-button.directive.js +42 -0
  105. package/{dist/es2015 → esm2015}/tools/print/editor-print-button.directive.js +18 -22
  106. package/esm2015/tools/select-all/select-all-button.directive.js +45 -0
  107. package/{dist/es2015 → esm2015}/tools/shared/dropdown-tool.directive.js +10 -10
  108. package/esm2015/tools/shared/editor-command-base.js +64 -0
  109. package/{dist/es2015 → esm2015}/tools/shared/editor-command-button.js +5 -5
  110. package/{dist/es2015 → esm2015}/tools/shared/editor-command-dialog.js +4 -5
  111. package/esm2015/tools/source/editor-view-source-button.directive.js +41 -0
  112. package/esm2015/tools/tables/editor-add-column-after-button.directive.js +35 -0
  113. package/esm2015/tools/tables/editor-add-column-before-button.directive.js +35 -0
  114. package/esm2015/tools/tables/editor-add-row-after-button.directive.js +35 -0
  115. package/esm2015/tools/tables/editor-add-row-before-button.directive.js +35 -0
  116. package/esm2015/tools/tables/editor-delete-column-button.directive.js +35 -0
  117. package/esm2015/tools/tables/editor-delete-row-button.directive.js +35 -0
  118. package/esm2015/tools/tables/editor-delete-table-button.directive.js +35 -0
  119. package/{dist/es2015 → esm2015}/tools/tables/editor-insert-table-button.component.js +66 -45
  120. package/esm2015/tools/tables/editor-merge-cells-button.directive.js +37 -0
  121. package/esm2015/tools/tables/editor-split-cell-button.directive.js +37 -0
  122. package/{dist/es2015 → esm2015}/tools/tables/popup-table-grid.component.js +32 -21
  123. package/esm2015/tools/tools.service.js +20 -0
  124. package/esm2015/tools/typographical-emphasis/editor-bold-button.directive.js +42 -0
  125. package/esm2015/tools/typographical-emphasis/editor-italic-button.directive.js +42 -0
  126. package/esm2015/tools/typographical-emphasis/editor-strikethrough-button.directive.js +42 -0
  127. package/esm2015/tools/typographical-emphasis/editor-subscript-button.directive.js +42 -0
  128. package/esm2015/tools/typographical-emphasis/editor-superscript-button.directive.js +42 -0
  129. package/esm2015/tools/typographical-emphasis/editor-underline-button.directive.js +42 -0
  130. package/{dist/es2015 → esm2015}/util.js +8 -0
  131. package/fesm2015/kendo-angular-editor.js +6396 -0
  132. package/kendo-angular-editor.d.ts +9 -0
  133. package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +6 -3
  134. package/{dist/es2015/localization → localization}/editor-localization.service.d.ts +3 -0
  135. package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +5 -2
  136. package/{dist/es2015/localization → localization}/messages.d.ts +4 -1
  137. package/{dist/es/index.js → main.d.ts} +39 -47
  138. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  139. package/package.json +44 -121
  140. package/{dist/es2015/preventable-events → preventable-events}/paste-event-data.d.ts +0 -0
  141. package/{dist/es2015/preventable-events → preventable-events}/paste-event.d.ts +1 -1
  142. package/preventable-events/preventable-event.d.ts +21 -0
  143. package/schematics/ngAdd/index.js +5 -2
  144. package/schematics/ngAdd/index.js.map +1 -1
  145. package/{dist/es2015/tools → tools}/alignment/editor-align-center-button.directive.d.ts +5 -2
  146. package/{dist/es2015/tools → tools}/alignment/editor-align-justify-button.directive.d.ts +5 -2
  147. package/{dist/es2015/tools → tools}/alignment/editor-align-left-button.directive.d.ts +5 -2
  148. package/{dist/es2015/tools → tools}/alignment/editor-align-right-button.directive.d.ts +5 -2
  149. package/{dist/es2015/tools → tools}/blockquote/editor-blockquote-button.directive.d.ts +5 -3
  150. package/{dist/es2015/tools → tools}/colorpicker/editor-back-color.directive.d.ts +3 -0
  151. package/{dist/es2015/tools → tools}/colorpicker/editor-colorpicker.component.d.ts +10 -6
  152. package/{dist/es2015/tools → tools}/colorpicker/editor-fore-color.directive.d.ts +3 -0
  153. package/{dist/es2015/tools → tools}/editor-clean-formatting-button.directive.d.ts +5 -2
  154. package/{dist/es2015/tools → tools}/fontfamily/editor-fontfamily-dropdownlist.component.d.ts +3 -0
  155. package/{dist/es2015/tools → tools}/fontfamily/editor-fontfamily.component.d.ts +10 -6
  156. package/{dist/es2015/tools → tools}/fontsize/editor-fontsize-dropdownlist.component.d.ts +3 -0
  157. package/{dist/es2015/tools → tools}/fontsize/editor-fontsize.component.d.ts +10 -6
  158. package/{dist/es2015/tools → tools}/format/editor-format-dropdownlist.component.d.ts +3 -0
  159. package/{dist/es2015/tools → tools}/format/editor-format.component.d.ts +10 -6
  160. package/{dist/es2015/tools → tools}/history/editor-redo-button.directive.d.ts +5 -2
  161. package/{dist/es2015/tools → tools}/history/editor-undo-button.directive.d.ts +5 -2
  162. package/{dist/es2015/tools → tools}/image/editor-insert-image-button.directive.d.ts +5 -2
  163. package/{dist/es2015/tools → tools}/indentation/editor-indent-button.directive.d.ts +5 -2
  164. package/{dist/es2015/tools → tools}/indentation/editor-outdent-button.directive.d.ts +5 -2
  165. package/{dist/es2015/tools → tools}/link/editor-create-link-button.directive.d.ts +5 -2
  166. package/{dist/es2015/tools → tools}/link/editor-insert-file-button.directive.d.ts +5 -2
  167. package/{dist/es2015/tools → tools}/link/editor-unlink-button.directive.d.ts +5 -2
  168. package/{dist/es2015/tools → tools}/list/editor-insert-ordered-list-button.directive.d.ts +5 -2
  169. package/{dist/es2015/tools → tools}/list/editor-insert-unordered-list-button.directive.d.ts +5 -2
  170. package/{dist/es2015/tools → tools}/print/editor-print-button.directive.d.ts +5 -3
  171. package/{dist/es2015/tools → tools}/select-all/select-all-button.directive.d.ts +5 -2
  172. package/{dist/es2015/tools → tools}/shared/dropdown-tool.directive.d.ts +4 -1
  173. package/{dist/es2015/tools → tools}/shared/editor-command-base.d.ts +8 -4
  174. package/{dist/es2015/tools → tools}/shared/editor-command-button.d.ts +5 -5
  175. package/{dist/es2015/tools → tools}/shared/editor-command-dialog.d.ts +4 -5
  176. package/{dist/es2015/tools → tools}/source/editor-view-source-button.directive.d.ts +5 -2
  177. package/{dist/es2015/tools → tools}/tables/editor-add-column-after-button.directive.d.ts +5 -2
  178. package/{dist/es2015/tools → tools}/tables/editor-add-column-before-button.directive.d.ts +5 -2
  179. package/{dist/es2015/tools → tools}/tables/editor-add-row-after-button.directive.d.ts +5 -2
  180. package/{dist/es2015/tools → tools}/tables/editor-add-row-before-button.directive.d.ts +5 -2
  181. package/{dist/es2015/tools → tools}/tables/editor-delete-column-button.directive.d.ts +5 -2
  182. package/{dist/es2015/tools → tools}/tables/editor-delete-row-button.directive.d.ts +5 -2
  183. package/{dist/es2015/tools → tools}/tables/editor-delete-table-button.directive.d.ts +5 -2
  184. package/{dist/es2015/tools → tools}/tables/editor-insert-table-button.component.d.ts +10 -9
  185. package/{dist/es2015/tools → tools}/tables/editor-merge-cells-button.directive.d.ts +5 -2
  186. package/{dist/es2015/tools → tools}/tables/editor-split-cell-button.directive.d.ts +5 -2
  187. package/{dist/es2015/tools → tools}/tables/popup-table-grid.component.d.ts +7 -6
  188. package/{dist/es2015/tools → tools}/tools.service.d.ts +3 -0
  189. package/{dist/es2015/tools → tools}/typographical-emphasis/editor-bold-button.directive.d.ts +5 -2
  190. package/{dist/es2015/tools → tools}/typographical-emphasis/editor-italic-button.directive.d.ts +5 -2
  191. package/{dist/es2015/tools → tools}/typographical-emphasis/editor-strikethrough-button.directive.d.ts +5 -2
  192. package/{dist/es2015/tools → tools}/typographical-emphasis/editor-subscript-button.directive.d.ts +5 -2
  193. package/{dist/es2015/tools → tools}/typographical-emphasis/editor-superscript-button.directive.d.ts +5 -2
  194. package/{dist/es2015/tools → tools}/typographical-emphasis/editor-underline-button.directive.d.ts +5 -2
  195. package/{dist/es2015/util.d.ts → util.d.ts} +7 -0
  196. package/dist/cdn/js/kendo-angular-editor.js +0 -20
  197. package/dist/cdn/main.js +0 -5
  198. package/dist/es/common/apply-to-word-options.js +0 -4
  199. package/dist/es/common/direction.js +0 -4
  200. package/dist/es/common/error-messages.js +0 -19
  201. package/dist/es/common/styles.js +0 -16
  202. package/dist/es/config/command-icons.js +0 -48
  203. package/dist/es/config/commands.js +0 -71
  204. package/dist/es/config/schema.js +0 -22
  205. package/dist/es/config/semantic-nodes.js +0 -32
  206. package/dist/es/config/table-commands.js +0 -14
  207. package/dist/es/config/utils.js +0 -102
  208. package/dist/es/dialogs/colorpicker-dialog.component.js +0 -70
  209. package/dist/es/dialogs/file-link-dialog.component.js +0 -126
  210. package/dist/es/dialogs/font-family-dialog.component.js +0 -65
  211. package/dist/es/dialogs/font-size-dialog.component.js +0 -65
  212. package/dist/es/dialogs/format-dialog.component.js +0 -65
  213. package/dist/es/dialogs/image-dialog.component.js +0 -102
  214. package/dist/es/dialogs/insert-table-dialog.component.js +0 -49
  215. package/dist/es/dialogs/source-dialog.component.js +0 -72
  216. package/dist/es/editor-toolbar-state.js +0 -280
  217. package/dist/es/editor.component.js +0 -1039
  218. package/dist/es/editor.module.js +0 -241
  219. package/dist/es/localization/custom-messages.component.js +0 -45
  220. package/dist/es/localization/editor-localization.service.js +0 -24
  221. package/dist/es/localization/localized-messages.directive.js +0 -36
  222. package/dist/es/localization/messages.js +0 -230
  223. package/dist/es/main.js +0 -9
  224. package/dist/es/package-metadata.js +0 -15
  225. package/dist/es/preventable-events/paste-event.js +0 -25
  226. package/dist/es/tools/alignment/editor-align-center-button.directive.js +0 -47
  227. package/dist/es/tools/alignment/editor-align-justify-button.directive.js +0 -47
  228. package/dist/es/tools/alignment/editor-align-left-button.directive.js +0 -47
  229. package/dist/es/tools/alignment/editor-align-right-button.directive.js +0 -47
  230. package/dist/es/tools/blockquote/editor-blockquote-button.directive.js +0 -48
  231. package/dist/es/tools/colorpicker/editor-back-color.directive.js +0 -28
  232. package/dist/es/tools/colorpicker/editor-colorpicker.component.js +0 -233
  233. package/dist/es/tools/colorpicker/editor-fore-color.directive.js +0 -28
  234. package/dist/es/tools/editor-clean-formatting-button.directive.js +0 -46
  235. package/dist/es/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +0 -71
  236. package/dist/es/tools/fontfamily/editor-fontfamily.component.js +0 -211
  237. package/dist/es/tools/fontsize/editor-fontsize-dropdownlist.component.js +0 -71
  238. package/dist/es/tools/fontsize/editor-fontsize.component.js +0 -206
  239. package/dist/es/tools/format/editor-format-dropdownlist.component.js +0 -71
  240. package/dist/es/tools/format/editor-format.component.js +0 -202
  241. package/dist/es/tools/history/editor-redo-button.directive.js +0 -47
  242. package/dist/es/tools/history/editor-undo-button.directive.js +0 -47
  243. package/dist/es/tools/image/editor-insert-image-button.directive.js +0 -46
  244. package/dist/es/tools/indentation/editor-indent-button.directive.js +0 -47
  245. package/dist/es/tools/indentation/editor-outdent-button.directive.js +0 -47
  246. package/dist/es/tools/link/editor-create-link-button.directive.js +0 -47
  247. package/dist/es/tools/link/editor-insert-file-button.directive.js +0 -39
  248. package/dist/es/tools/link/editor-unlink-button.directive.js +0 -47
  249. package/dist/es/tools/list/editor-insert-ordered-list-button.directive.js +0 -47
  250. package/dist/es/tools/list/editor-insert-unordered-list-button.directive.js +0 -47
  251. package/dist/es/tools/print/editor-print-button.directive.js +0 -69
  252. package/dist/es/tools/select-all/select-all-button.directive.js +0 -50
  253. package/dist/es/tools/shared/dropdown-tool.directive.js +0 -41
  254. package/dist/es/tools/shared/editor-command-base.js +0 -49
  255. package/dist/es/tools/shared/editor-command-button.js +0 -34
  256. package/dist/es/tools/shared/editor-command-dialog.js +0 -30
  257. package/dist/es/tools/source/editor-view-source-button.directive.js +0 -46
  258. package/dist/es/tools/tables/editor-add-column-after-button.directive.js +0 -40
  259. package/dist/es/tools/tables/editor-add-column-before-button.directive.js +0 -40
  260. package/dist/es/tools/tables/editor-add-row-after-button.directive.js +0 -40
  261. package/dist/es/tools/tables/editor-add-row-before-button.directive.js +0 -40
  262. package/dist/es/tools/tables/editor-delete-column-button.directive.js +0 -40
  263. package/dist/es/tools/tables/editor-delete-row-button.directive.js +0 -40
  264. package/dist/es/tools/tables/editor-delete-table-button.directive.js +0 -40
  265. package/dist/es/tools/tables/editor-insert-table-button.component.js +0 -202
  266. package/dist/es/tools/tables/editor-merge-cells-button.directive.js +0 -42
  267. package/dist/es/tools/tables/editor-split-cell-button.directive.js +0 -42
  268. package/dist/es/tools/tables/popup-table-grid.component.js +0 -69
  269. package/dist/es/tools/tools.service.js +0 -20
  270. package/dist/es/tools/typographical-emphasis/editor-bold-button.directive.js +0 -47
  271. package/dist/es/tools/typographical-emphasis/editor-italic-button.directive.js +0 -47
  272. package/dist/es/tools/typographical-emphasis/editor-strikethrough-button.directive.js +0 -47
  273. package/dist/es/tools/typographical-emphasis/editor-subscript-button.directive.js +0 -47
  274. package/dist/es/tools/typographical-emphasis/editor-superscript-button.directive.js +0 -47
  275. package/dist/es/tools/typographical-emphasis/editor-underline-button.directive.js +0 -47
  276. package/dist/es/util.js +0 -127
  277. package/dist/es2015/common/commands.js +0 -4
  278. package/dist/es2015/common/font-family-item.interface.js +0 -4
  279. package/dist/es2015/common/font-size-item.interface.js +0 -4
  280. package/dist/es2015/common/format-item.interface.js +0 -4
  281. package/dist/es2015/common/image-data.interface.js +0 -4
  282. package/dist/es2015/common/link-data.interface.js +0 -4
  283. package/dist/es2015/common/paste-cleanup-settings.js +0 -4
  284. package/dist/es2015/common/plugins-function.js +0 -4
  285. package/dist/es2015/common/predicate.js +0 -4
  286. package/dist/es2015/common/resizable-options.interface.js +0 -4
  287. package/dist/es2015/common/table-data.interface.js +0 -4
  288. package/dist/es2015/config/commands.js +0 -67
  289. package/dist/es2015/dialogs/colorpicker-dialog.component.js +0 -92
  290. package/dist/es2015/dialogs/file-link-dialog.component.js +0 -163
  291. package/dist/es2015/dialogs/font-family-dialog.component.js +0 -84
  292. package/dist/es2015/dialogs/font-size-dialog.component.js +0 -84
  293. package/dist/es2015/dialogs/format-dialog.component.js +0 -84
  294. package/dist/es2015/dialogs/insert-table-dialog.component.js +0 -60
  295. package/dist/es2015/dialogs/source-dialog.component.js +0 -81
  296. package/dist/es2015/editor.module.d.ts +0 -45
  297. package/dist/es2015/index.d.ts +0 -72
  298. package/dist/es2015/index.metadata.json +0 -1
  299. package/dist/es2015/localization/custom-messages.component.js +0 -37
  300. package/dist/es2015/localization/editor-localization.service.js +0 -22
  301. package/dist/es2015/localization/localized-messages.directive.js +0 -32
  302. package/dist/es2015/localization/messages.js +0 -224
  303. package/dist/es2015/main.d.ts +0 -13
  304. package/dist/es2015/main.js +0 -9
  305. package/dist/es2015/preventable-events/paste-event-data.js +0 -4
  306. package/dist/es2015/tools/alignment/editor-align-center-button.directive.js +0 -45
  307. package/dist/es2015/tools/alignment/editor-align-justify-button.directive.js +0 -45
  308. package/dist/es2015/tools/alignment/editor-align-left-button.directive.js +0 -45
  309. package/dist/es2015/tools/alignment/editor-align-right-button.directive.js +0 -45
  310. package/dist/es2015/tools/blockquote/editor-blockquote-button.directive.js +0 -45
  311. package/dist/es2015/tools/colorpicker/editor-back-color.directive.js +0 -27
  312. package/dist/es2015/tools/colorpicker/editor-colorpicker.component.js +0 -249
  313. package/dist/es2015/tools/colorpicker/editor-fore-color.directive.js +0 -27
  314. package/dist/es2015/tools/editor-clean-formatting-button.directive.js +0 -44
  315. package/dist/es2015/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +0 -99
  316. package/dist/es2015/tools/fontsize/editor-fontsize-dropdownlist.component.js +0 -94
  317. package/dist/es2015/tools/format/editor-format-dropdownlist.component.js +0 -127
  318. package/dist/es2015/tools/history/editor-redo-button.directive.js +0 -45
  319. package/dist/es2015/tools/history/editor-undo-button.directive.js +0 -45
  320. package/dist/es2015/tools/image/editor-insert-image-button.directive.js +0 -44
  321. package/dist/es2015/tools/indentation/editor-indent-button.directive.js +0 -45
  322. package/dist/es2015/tools/indentation/editor-outdent-button.directive.js +0 -45
  323. package/dist/es2015/tools/link/editor-create-link-button.directive.js +0 -45
  324. package/dist/es2015/tools/link/editor-insert-file-button.directive.js +0 -37
  325. package/dist/es2015/tools/link/editor-unlink-button.directive.js +0 -45
  326. package/dist/es2015/tools/list/editor-insert-ordered-list-button.directive.js +0 -45
  327. package/dist/es2015/tools/list/editor-insert-unordered-list-button.directive.js +0 -45
  328. package/dist/es2015/tools/select-all/select-all-button.directive.js +0 -48
  329. package/dist/es2015/tools/shared/editor-command-base.js +0 -46
  330. package/dist/es2015/tools/source/editor-view-source-button.directive.js +0 -44
  331. package/dist/es2015/tools/tables/editor-add-column-after-button.directive.js +0 -38
  332. package/dist/es2015/tools/tables/editor-add-column-before-button.directive.js +0 -38
  333. package/dist/es2015/tools/tables/editor-add-row-after-button.directive.js +0 -38
  334. package/dist/es2015/tools/tables/editor-add-row-before-button.directive.js +0 -38
  335. package/dist/es2015/tools/tables/editor-delete-column-button.directive.js +0 -38
  336. package/dist/es2015/tools/tables/editor-delete-row-button.directive.js +0 -38
  337. package/dist/es2015/tools/tables/editor-delete-table-button.directive.js +0 -38
  338. package/dist/es2015/tools/tables/editor-merge-cells-button.directive.js +0 -40
  339. package/dist/es2015/tools/tables/editor-split-cell-button.directive.js +0 -40
  340. package/dist/es2015/tools/tools.service.js +0 -22
  341. package/dist/es2015/tools/typographical-emphasis/editor-bold-button.directive.js +0 -45
  342. package/dist/es2015/tools/typographical-emphasis/editor-italic-button.directive.js +0 -45
  343. package/dist/es2015/tools/typographical-emphasis/editor-strikethrough-button.directive.js +0 -45
  344. package/dist/es2015/tools/typographical-emphasis/editor-subscript-button.directive.js +0 -45
  345. package/dist/es2015/tools/typographical-emphasis/editor-superscript-button.directive.js +0 -45
  346. package/dist/es2015/tools/typographical-emphasis/editor-underline-button.directive.js +0 -45
  347. package/dist/fesm2015/index.js +0 -5842
  348. package/dist/fesm5/index.js +0 -5300
  349. package/dist/npm/common/active-marks.js +0 -6
  350. package/dist/npm/common/apply-to-word-options.js +0 -6
  351. package/dist/npm/common/commands.js +0 -6
  352. package/dist/npm/common/direction.js +0 -6
  353. package/dist/npm/common/error-messages.js +0 -22
  354. package/dist/npm/common/font-family-item.interface.js +0 -6
  355. package/dist/npm/common/font-size-item.interface.js +0 -6
  356. package/dist/npm/common/format-item.interface.js +0 -6
  357. package/dist/npm/common/image-data.interface.js +0 -6
  358. package/dist/npm/common/link-data.interface.js +0 -6
  359. package/dist/npm/common/paste-cleanup-settings.js +0 -6
  360. package/dist/npm/common/plugins-function.js +0 -6
  361. package/dist/npm/common/predicate.js +0 -6
  362. package/dist/npm/common/resizable-options.interface.js +0 -6
  363. package/dist/npm/common/styles.js +0 -18
  364. package/dist/npm/common/table-data.interface.js +0 -6
  365. package/dist/npm/config/command-icons.js +0 -50
  366. package/dist/npm/config/commands.js +0 -112
  367. package/dist/npm/config/schema.js +0 -21
  368. package/dist/npm/config/semantic-nodes.js +0 -35
  369. package/dist/npm/config/table-commands.js +0 -16
  370. package/dist/npm/config/utils.js +0 -104
  371. package/dist/npm/dialogs/colorpicker-dialog.component.js +0 -72
  372. package/dist/npm/dialogs/file-link-dialog.component.js +0 -128
  373. package/dist/npm/dialogs/font-family-dialog.component.js +0 -67
  374. package/dist/npm/dialogs/font-size-dialog.component.js +0 -67
  375. package/dist/npm/dialogs/format-dialog.component.js +0 -67
  376. package/dist/npm/dialogs/image-dialog.component.js +0 -104
  377. package/dist/npm/dialogs/insert-table-dialog.component.js +0 -51
  378. package/dist/npm/dialogs/source-dialog.component.js +0 -74
  379. package/dist/npm/editor-toolbar-state.js +0 -282
  380. package/dist/npm/editor.component.js +0 -1041
  381. package/dist/npm/editor.module.js +0 -243
  382. package/dist/npm/index.js +0 -138
  383. package/dist/npm/localization/custom-messages.component.js +0 -47
  384. package/dist/npm/localization/editor-localization.service.js +0 -26
  385. package/dist/npm/localization/localized-messages.directive.js +0 -38
  386. package/dist/npm/localization/messages.js +0 -232
  387. package/dist/npm/main.js +0 -38
  388. package/dist/npm/package-metadata.js +0 -17
  389. package/dist/npm/preventable-events/paste-event-data.js +0 -6
  390. package/dist/npm/preventable-events/paste-event.js +0 -27
  391. package/dist/npm/tools/alignment/editor-align-center-button.directive.js +0 -49
  392. package/dist/npm/tools/alignment/editor-align-justify-button.directive.js +0 -49
  393. package/dist/npm/tools/alignment/editor-align-left-button.directive.js +0 -49
  394. package/dist/npm/tools/alignment/editor-align-right-button.directive.js +0 -49
  395. package/dist/npm/tools/blockquote/editor-blockquote-button.directive.js +0 -50
  396. package/dist/npm/tools/colorpicker/editor-back-color.directive.js +0 -30
  397. package/dist/npm/tools/colorpicker/editor-colorpicker.component.js +0 -235
  398. package/dist/npm/tools/colorpicker/editor-fore-color.directive.js +0 -30
  399. package/dist/npm/tools/editor-clean-formatting-button.directive.js +0 -48
  400. package/dist/npm/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +0 -73
  401. package/dist/npm/tools/fontfamily/editor-fontfamily.component.js +0 -213
  402. package/dist/npm/tools/fontsize/editor-fontsize-dropdownlist.component.js +0 -73
  403. package/dist/npm/tools/fontsize/editor-fontsize.component.js +0 -208
  404. package/dist/npm/tools/format/editor-format-dropdownlist.component.js +0 -73
  405. package/dist/npm/tools/format/editor-format.component.js +0 -204
  406. package/dist/npm/tools/history/editor-redo-button.directive.js +0 -49
  407. package/dist/npm/tools/history/editor-undo-button.directive.js +0 -49
  408. package/dist/npm/tools/image/editor-insert-image-button.directive.js +0 -48
  409. package/dist/npm/tools/indentation/editor-indent-button.directive.js +0 -49
  410. package/dist/npm/tools/indentation/editor-outdent-button.directive.js +0 -49
  411. package/dist/npm/tools/link/editor-create-link-button.directive.js +0 -49
  412. package/dist/npm/tools/link/editor-insert-file-button.directive.js +0 -41
  413. package/dist/npm/tools/link/editor-unlink-button.directive.js +0 -49
  414. package/dist/npm/tools/list/editor-insert-ordered-list-button.directive.js +0 -49
  415. package/dist/npm/tools/list/editor-insert-unordered-list-button.directive.js +0 -49
  416. package/dist/npm/tools/print/editor-print-button.directive.js +0 -71
  417. package/dist/npm/tools/select-all/select-all-button.directive.js +0 -52
  418. package/dist/npm/tools/shared/dropdown-tool.directive.js +0 -43
  419. package/dist/npm/tools/shared/editor-command-base.js +0 -51
  420. package/dist/npm/tools/shared/editor-command-button.js +0 -36
  421. package/dist/npm/tools/shared/editor-command-dialog.js +0 -32
  422. package/dist/npm/tools/source/editor-view-source-button.directive.js +0 -48
  423. package/dist/npm/tools/tables/editor-add-column-after-button.directive.js +0 -42
  424. package/dist/npm/tools/tables/editor-add-column-before-button.directive.js +0 -42
  425. package/dist/npm/tools/tables/editor-add-row-after-button.directive.js +0 -42
  426. package/dist/npm/tools/tables/editor-add-row-before-button.directive.js +0 -42
  427. package/dist/npm/tools/tables/editor-delete-column-button.directive.js +0 -42
  428. package/dist/npm/tools/tables/editor-delete-row-button.directive.js +0 -42
  429. package/dist/npm/tools/tables/editor-delete-table-button.directive.js +0 -42
  430. package/dist/npm/tools/tables/editor-insert-table-button.component.js +0 -204
  431. package/dist/npm/tools/tables/editor-merge-cells-button.directive.js +0 -44
  432. package/dist/npm/tools/tables/editor-split-cell-button.directive.js +0 -44
  433. package/dist/npm/tools/tables/popup-table-grid.component.js +0 -71
  434. package/dist/npm/tools/tools.service.js +0 -22
  435. package/dist/npm/tools/typographical-emphasis/editor-bold-button.directive.js +0 -49
  436. package/dist/npm/tools/typographical-emphasis/editor-italic-button.directive.js +0 -49
  437. package/dist/npm/tools/typographical-emphasis/editor-strikethrough-button.directive.js +0 -49
  438. package/dist/npm/tools/typographical-emphasis/editor-subscript-button.directive.js +0 -49
  439. package/dist/npm/tools/typographical-emphasis/editor-superscript-button.directive.js +0 -49
  440. package/dist/npm/tools/typographical-emphasis/editor-underline-button.directive.js +0 -49
  441. package/dist/npm/util.js +0 -130
  442. package/dist/systemjs/kendo-angular-editor.js +0 -5
@@ -1,1039 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Component, HostBinding, ViewChild, ContentChild, ViewContainerRef, Output, ElementRef, EventEmitter, forwardRef, Input, ChangeDetectorRef, NgZone, isDevMode } from '@angular/core';
7
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
- import { BehaviorSubject, fromEvent, Subject, zip } from 'rxjs';
9
- import { map, filter, take } from 'rxjs/operators';
10
- import { ToolBarComponent } from '@progress/kendo-angular-toolbar';
11
- import { DialogService } from '@progress/kendo-angular-dialog';
12
- import { hasObservers, isDocumentAvailable, KendoInput } from '@progress/kendo-angular-common';
13
- import { buildKeymap, buildListKeymap, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, AllSelection, gapCursor, getSelectionText, imageResizing, tableEditing, caretColor } from '@progress/kendo-editor-common';
14
- import { validatePackage } from '@progress/kendo-licensing';
15
- import { packageMetadata } from './package-metadata';
16
- import { schema } from './config/schema';
17
- import { editorCommands } from './config/commands';
18
- import { getToolbarState, initialToolBarState, disabledToolBarState } from './editor-toolbar-state';
19
- import { detectIE, removeEmptyEntries, conditionallyExecute, pipe, isPresent } from './util';
20
- import { SourceDialogComponent } from './dialogs/source-dialog.component';
21
- import { ImageDialogComponent } from './dialogs/image-dialog.component';
22
- import { FileLinkDialogComponent } from './dialogs/file-link-dialog.component';
23
- import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
24
- import { EditorLocalizationService } from './localization/editor-localization.service';
25
- import { defaultStyle, tablesStyles, rtlStyles } from './common/styles';
26
- import { EditorErrorMessages } from './common/error-messages';
27
- import { EditorToolsService } from './tools/tools.service';
28
- import { EditorPasteEvent } from './preventable-events/paste-event';
29
- var EMPTY_PARAGRAPH = '<p></p>';
30
- var defaultPasteCleanupSettings = {
31
- convertMsLists: false,
32
- removeAttributes: [],
33
- removeHtmlComments: false,
34
- removeInvalidHTML: true,
35
- removeMsClasses: false,
36
- removeMsStyles: false,
37
- stripTags: []
38
- };
39
- var removeCommentsIf = conditionallyExecute(removeComments);
40
- var removeInvalidHTMLIf = conditionallyExecute(sanitize);
41
- var getPasteCleanupAttributes = function (config) {
42
- if (config.removeAttributes === 'all') {
43
- return { '*': removeAttribute };
44
- }
45
- var initial = removeEmptyEntries({
46
- style: config.removeMsStyles ? sanitizeStyleAttr : undefined,
47
- class: config.removeMsClasses ? sanitizeClassAttr : undefined
48
- });
49
- return config.removeAttributes.reduce(function (acc, curr) {
50
- var _a;
51
- return (tslib_1.__assign({}, acc, (_a = {}, _a[curr] = removeAttribute, _a)));
52
- }, initial);
53
- };
54
- var ɵ0 = getPasteCleanupAttributes;
55
- /**
56
- * Represents the [Kendo UI Editor component for Angular]({% slug overview_editor %}).
57
- */
58
- var EditorComponent = /** @class */ (function () {
59
- function EditorComponent(dialogService, localization, cdr, ngZone, element, toolsService) {
60
- var _this = this;
61
- this.dialogService = dialogService;
62
- this.localization = localization;
63
- this.cdr = cdr;
64
- this.ngZone = ngZone;
65
- this.element = element;
66
- this.toolsService = toolsService;
67
- /**
68
- * If set to `false`, the Editor will run in style non-encapsulated mode. This means
69
- * that the styles of the page will be persisted in the Editor and its content will be affected by them.
70
- * @default true
71
- */
72
- this.iframe = true;
73
- /**
74
- * If set to `true` or `ApplyToWordOptions` object, commands that apply emphasis or inline styles will be applied to the whole word the cursor is in.
75
- * @default false
76
- */
77
- this.applyToWord = false;
78
- /**
79
- * By default, whitespace is collapsed as per HTML's rules.
80
- * Set to `true` to preserve whitespace, but normalize newlines to spaces.
81
- * Set to `'full'` to preserve whitespace entirely. In this case the default ProseMirror behavior is to parse white space into nodes.
82
- *
83
- * @default false
84
- */
85
- this.preserveWhitespace = false;
86
- /**
87
- * Determines whether the Editor can be resized ([see example]({% slug styling_editor %}#toc-resizable-editor)).
88
- * @default false
89
- */
90
- this.resizable = false;
91
- /**
92
- * Fires each time the value of the Editor is changed upon user interaction&mdash;
93
- * for example, when the value is updated through typing in the content area or using some of the Editor tools ([see example]({% slug overview_editor %}#toc-events)).
94
- * When the value of the Editor is programmatically changed through its API (`ngModel`) or form binding (`formControl`),
95
- * the `valueChange` event is not triggered because it might cause a mix-up with the
96
- * built-in `valueChange` mechanisms of the `ngModel` or `formControl` bindings.
97
- */
98
- this.valueChange = new EventEmitter();
99
- /**
100
- * Fires when the content area of the Editor is focused ([see example]({% slug overview_editor %}#toc-events)).
101
- */
102
- this.onFocus = new EventEmitter();
103
- /**
104
- * Fires when the user performs paste in the content area of the Editor ([see example]({% slug overview_editor %}#toc-events)).
105
- * The event is preventable. If you cancel it, the Editor content will not change.
106
- */
107
- this.paste = new EventEmitter();
108
- /**
109
- * Fires when the content area of the Editor is blurred ([see example]({% slug overview_editor %}#toc-events)).
110
- */
111
- this.onBlur = new EventEmitter();
112
- this.hostClass = true;
113
- /**
114
- * @hidden
115
- */
116
- this.stateChange = new BehaviorSubject(initialToolBarState);
117
- /**
118
- * @hidden
119
- */
120
- this.valueModified = new Subject();
121
- this._readonly = false;
122
- this._placeholder = '';
123
- this.inForm = false;
124
- this.afterViewInit = new Subject();
125
- this.contentAreaLoaded = new Subject();
126
- this.dispatchTransaction = function (tr) {
127
- var docChanged = tr.docChanged;
128
- if (_this.disabled || (_this.readonly && docChanged)) {
129
- return;
130
- }
131
- if (docChanged) {
132
- var doc = tr.doc;
133
- var html_1 = getHtml({ doc: doc });
134
- _this.trOnChange = tr;
135
- _this.htmlOnChange = html_1;
136
- _this.ngZone.run(function () {
137
- _this.valueModified.next(html_1);
138
- });
139
- }
140
- if (!docChanged || _this.inForm) {
141
- _this.view.updateState(_this.view.state.apply(tr));
142
- }
143
- };
144
- this.transformPastedHTML = function (dirtyHtml) {
145
- var pasteCleanupSettings = tslib_1.__assign({}, defaultPasteCleanupSettings, _this.pasteCleanupSettings);
146
- var html = pipe(removeInvalidHTMLIf(pasteCleanupSettings.removeInvalidHTML), removeCommentsIf(pasteCleanupSettings.removeHtmlComments))(dirtyHtml);
147
- var clean = pasteCleanup(html, {
148
- convertMsLists: pasteCleanupSettings.convertMsLists,
149
- stripTags: pasteCleanupSettings.stripTags.join('|'),
150
- attributes: getPasteCleanupAttributes(pasteCleanupSettings)
151
- });
152
- if (hasObservers(_this.paste)) {
153
- var event_1 = new EditorPasteEvent(clean, dirtyHtml, _this._pasteEvent);
154
- _this.ngZone.run(function () { return _this.paste.emit(event_1); });
155
- return event_1.isDefaultPrevented() ? '' : event_1.cleanedHtml;
156
- }
157
- return clean;
158
- };
159
- this.changeValue = function (value) {
160
- var prev = _this._value;
161
- _this._value = value;
162
- if (!_this._view) {
163
- return;
164
- }
165
- if (_this.htmlOnChange === value && _this.trOnChange) {
166
- _this.view.updateState(_this.view.state.apply(_this.trOnChange));
167
- }
168
- else {
169
- if ((prev || '') !== (value || '')) {
170
- var iframeContentWindowNotPresent = _this.iframe && !_this.container.element.nativeElement.contentWindow;
171
- if (iframeContentWindowNotPresent) {
172
- return;
173
- }
174
- var state = _this.view.state;
175
- var nextDoc = parseContent(value || '', state.schema, { preserveWhitespace: _this.preserveWhitespace });
176
- var tr = state.tr
177
- .setSelection(new AllSelection(state.doc))
178
- .replaceSelectionWith(nextDoc);
179
- _this.view.updateState(state.apply(tr));
180
- }
181
- }
182
- _this.trOnChange = null;
183
- _this.htmlOnChange = null;
184
- };
185
- this.onChangeCallback = function (value) {
186
- _this.changeValue(value);
187
- };
188
- this.onTouchedCallback = function (_) { }; // tslint:disable-line:no-empty
189
- this.onPaste = function (_view, nativeEvent) {
190
- _this._pasteEvent = nativeEvent;
191
- return false;
192
- };
193
- validatePackage(packageMetadata);
194
- this.direction = localization.rtl ? 'rtl' : 'ltr';
195
- // https://stackoverflow.com/questions/56572483/chrome-is-synchronously-handling-iframe-loading-whereas-firefox-handles-it-asyn
196
- this.subs = zip(this.afterViewInit.asObservable(), this.contentAreaLoaded.asObservable()).subscribe(function () { return _this.initialize(); });
197
- }
198
- EditorComponent_1 = EditorComponent;
199
- Object.defineProperty(EditorComponent.prototype, "value", {
200
- get: function () {
201
- if (this.trOnChange) {
202
- return this.htmlOnChange;
203
- }
204
- var value = this._view ? this.getSource() : this._value;
205
- if (value === EMPTY_PARAGRAPH) {
206
- return this._value ? '' : this._value;
207
- }
208
- else {
209
- return value;
210
- }
211
- },
212
- /**
213
- * Sets the value of the Editor ([see example]({% slug overview_editor %}#toc-basic-usage)).
214
- */
215
- set: function (value) {
216
- this.changeValue(value);
217
- },
218
- enumerable: true,
219
- configurable: true
220
- });
221
- Object.defineProperty(EditorComponent.prototype, "disabled", {
222
- get: function () {
223
- return this._disabled;
224
- },
225
- /**
226
- * Sets the disabled state of the component.
227
- */
228
- set: function (value) {
229
- this._disabled = value || false;
230
- if (this._view) {
231
- this._view.updateState(this._view.state);
232
- }
233
- if (this._disabled) {
234
- this.readonly = false;
235
- }
236
- if (this._disabled || this._readonly) {
237
- this.stateChange.next(disabledToolBarState);
238
- }
239
- else {
240
- this.stateChange.next(initialToolBarState);
241
- }
242
- },
243
- enumerable: true,
244
- configurable: true
245
- });
246
- Object.defineProperty(EditorComponent.prototype, "readonly", {
247
- get: function () {
248
- return this._readonly;
249
- },
250
- /**
251
- * Sets the read-only state of the component.
252
- */
253
- set: function (value) {
254
- this._readonly = value || false;
255
- if (this._view) {
256
- // remove DOM selection
257
- var win = void 0;
258
- if (this.iframe) {
259
- win = this.container.element.nativeElement.contentWindow;
260
- }
261
- else {
262
- win = window;
263
- }
264
- var focusedNode = win.getSelection().focusNode;
265
- if (this._view.dom.contains(focusedNode)) {
266
- win.getSelection().removeAllRanges();
267
- }
268
- // remove ProseMirror selection
269
- var doc = this._view.state.doc;
270
- var tr = this._view.state.tr.setSelection(TextSelection.create(doc, 1));
271
- this._view.dispatch(tr);
272
- }
273
- if (this._readonly) {
274
- if (this.toolbar) {
275
- this.toolbar.tabindex = -1;
276
- }
277
- this.stateChange.next(disabledToolBarState);
278
- }
279
- else {
280
- if (this.toolbar) {
281
- this.toolbar.tabindex = 0;
282
- }
283
- this.stateChange.next(initialToolBarState);
284
- }
285
- },
286
- enumerable: true,
287
- configurable: true
288
- });
289
- Object.defineProperty(EditorComponent.prototype, "schema", {
290
- get: function () {
291
- return this._schema;
292
- },
293
- /**
294
- * Allows providing a custom schema. ([see example]({% slug schema_editor %}))
295
- */
296
- set: function (value) {
297
- if (isDevMode) {
298
- if (!(value instanceof Schema)) {
299
- throw new Error(EditorErrorMessages.schemaType);
300
- }
301
- if (this._view) {
302
- throw new Error(EditorErrorMessages.setSchemaOnce);
303
- }
304
- }
305
- this._schema = value;
306
- },
307
- enumerable: true,
308
- configurable: true
309
- });
310
- Object.defineProperty(EditorComponent.prototype, "plugins", {
311
- get: function () {
312
- return this._plugins;
313
- },
314
- /**
315
- * Defines a function which determines the plugins that will be used when initializing the Editor.
316
- * It exposes the default plugins collection as an argument, and returns
317
- * the plugins collection that will be used when creating the Editor component. ([see example]({% slug plugins_editor %}))
318
- *
319
- * ```ts-no-run
320
- * pluginsCallback(defaultPlugins: Plugin[]): Plugin[] {
321
- * const myPlugin = new Plugin({/custom plugin code/});
322
- * return [...defaultPlugins, myPlugin];
323
- * }
324
- * ```
325
- */
326
- set: function (fn) {
327
- if (isDevMode) {
328
- if (typeof fn !== 'function') {
329
- throw new Error(EditorErrorMessages.pluginsCallbackType(fn));
330
- }
331
- if (this._view) {
332
- throw new Error(EditorErrorMessages.setPluginsOnce);
333
- }
334
- }
335
- this._plugins = fn;
336
- },
337
- enumerable: true,
338
- configurable: true
339
- });
340
- Object.defineProperty(EditorComponent.prototype, "placeholder", {
341
- get: function () {
342
- return this._placeholder;
343
- },
344
- /**
345
- * The hint, which is displayed when the component is empty.
346
- */
347
- set: function (value) {
348
- if (isDevMode && this._view) {
349
- throw new Error(EditorErrorMessages.setPlaceHolderOnce);
350
- }
351
- this._placeholder = value;
352
- },
353
- enumerable: true,
354
- configurable: true
355
- });
356
- Object.defineProperty(EditorComponent.prototype, "resizableClass", {
357
- get: function () {
358
- return !!this.resizable;
359
- },
360
- enumerable: true,
361
- configurable: true
362
- });
363
- Object.defineProperty(EditorComponent.prototype, "isDisabled", {
364
- get: function () {
365
- return this.disabled;
366
- },
367
- enumerable: true,
368
- configurable: true
369
- });
370
- Object.defineProperty(EditorComponent.prototype, "isReadonly", {
371
- get: function () {
372
- return this.readonly;
373
- },
374
- enumerable: true,
375
- configurable: true
376
- });
377
- Object.defineProperty(EditorComponent.prototype, "isIE", {
378
- get: function () {
379
- return this.iframe && detectIE();
380
- },
381
- enumerable: true,
382
- configurable: true
383
- });
384
- Object.defineProperty(EditorComponent.prototype, "dir", {
385
- get: function () {
386
- return this.direction;
387
- },
388
- enumerable: true,
389
- configurable: true
390
- });
391
- Object.defineProperty(EditorComponent.prototype, "ariaDisabled", {
392
- get: function () {
393
- return this.disabled;
394
- },
395
- enumerable: true,
396
- configurable: true
397
- });
398
- Object.defineProperty(EditorComponent.prototype, "minWidth", {
399
- get: function () {
400
- var resizableOptions = this.resizable;
401
- return resizableOptions.minWidth ? resizableOptions.minWidth + 'px' : undefined;
402
- },
403
- enumerable: true,
404
- configurable: true
405
- });
406
- Object.defineProperty(EditorComponent.prototype, "maxWidth", {
407
- get: function () {
408
- var resizableOptions = this.resizable;
409
- return resizableOptions.maxWidth ? resizableOptions.maxWidth + 'px' : undefined;
410
- },
411
- enumerable: true,
412
- configurable: true
413
- });
414
- Object.defineProperty(EditorComponent.prototype, "minHeight", {
415
- get: function () {
416
- var resizableOptions = this.resizable;
417
- return resizableOptions.minHeight ? resizableOptions.minHeight + 'px' : undefined;
418
- },
419
- enumerable: true,
420
- configurable: true
421
- });
422
- Object.defineProperty(EditorComponent.prototype, "maxHeight", {
423
- get: function () {
424
- var resizableOptions = this.resizable;
425
- return resizableOptions.maxHeight ? resizableOptions.maxHeight + 'px' : undefined;
426
- },
427
- enumerable: true,
428
- configurable: true
429
- });
430
- Object.defineProperty(EditorComponent.prototype, "toolbar", {
431
- get: function () {
432
- return this.defaultToolbarComponent || this.userToolBarComponent;
433
- },
434
- enumerable: true,
435
- configurable: true
436
- });
437
- Object.defineProperty(EditorComponent.prototype, "view", {
438
- /**
439
- * Returns the ProseMirror [EditorView](https://prosemirror.net/docs/ref/#view.EditorView) object
440
- * that manages the DOM structure that represents an editable document.
441
- */
442
- get: function () {
443
- return this._view;
444
- },
445
- enumerable: true,
446
- configurable: true
447
- });
448
- Object.defineProperty(EditorComponent.prototype, "selectionText", {
449
- /**
450
- * Returns the text which the current Editor selection contains ([see example]({% slug selection_editor %}#toc-retrieve-the-selected-text)).
451
- */
452
- get: function () {
453
- return this._view && this._view.state ? getSelectionText(this._view.state) : '';
454
- },
455
- enumerable: true,
456
- configurable: true
457
- });
458
- EditorComponent.prototype.ngOnInit = function () {
459
- var _this = this;
460
- this.subs.add(this.localization.changes.subscribe(function (_a) {
461
- var rtl = _a.rtl;
462
- _this.direction = rtl ? 'rtl' : 'ltr';
463
- }));
464
- this.subs.add(this.toolsService.needsCheck.subscribe(function () { return _this.cdr.markForCheck(); }));
465
- };
466
- EditorComponent.prototype.ngAfterViewInit = function () {
467
- this.afterViewInit.next();
468
- if (!this.iframe) {
469
- this.contentAreaLoaded.next();
470
- }
471
- if (this.resizable) {
472
- this.normalizeSize();
473
- }
474
- };
475
- EditorComponent.prototype.ngOnChanges = function (changes) {
476
- var _this = this;
477
- if (changes.value && this.view) {
478
- this.changeValue(changes.value.currentValue);
479
- }
480
- if (changes.iframe && !changes.iframe.isFirstChange()) {
481
- this.ngZone.onStable.pipe(take(1)).subscribe(function () { return _this.initialize(); });
482
- }
483
- if (changes.resizable && !changes.resizable.isFirstChange()) {
484
- this.normalizeSize();
485
- }
486
- };
487
- /**
488
- * @hidden
489
- */
490
- EditorComponent.prototype.setDisabledState = function (isDisabled) {
491
- this.disabled = isDisabled;
492
- };
493
- /**
494
- * @hidden
495
- */
496
- EditorComponent.prototype.iframeOnLoad = function () {
497
- this.contentAreaLoaded.next();
498
- };
499
- /**
500
- * Executes a command on the currently selected text
501
- * ([more information and example]({% slug toolbartools_editor %}#toc-custom-tools)).
502
- *
503
- * @param {EditorCommand} commandName - The command that will be executed.
504
- * @param {any} attr - Optional parameters for the command. Apart from the following list,
505
- * the parameters do not expect specific attributes when you call them:
506
- * - `format` - Accepts an object with the `tag` property.
507
- * The supported tags are `p` and any of the `h1` to `h6` heading tags.
508
- * - `createLink` - Accepts an object with the `href`, `title`, and `target` properties. The `href` property is mandatory.
509
- * - `setHTML` - Accepts a `string` parameter.
510
- * - `insertTable` - Accepts an object with the `rows` and `cols` properties. The number values are zero based.
511
- *
512
- * @example
513
- * ```ts-no-run
514
- * // Toggles the bold styling.
515
- * editor.exec('bold');
516
- *
517
- * // Creates a bullet list.
518
- * editor.exec('insertUnorderedList');
519
- *
520
- * // Creates a link.
521
- * editor.exec('createLink', { href: 'www.progress.com', title: 'Progress', target: 'window' });
522
- *
523
- * // Inserts a file.
524
- * editor.exec('insertFile', { href: 'www.progress.com/resources/myfile.doc', title: 'My file', target: 'window' });
525
- *
526
- * // Inserts a image.
527
- * editor.exec('insertImage', { src: 'www.progress.com/resources/logo.jpg', title: 'Progress', target: 'window' });
528
- *
529
- * // Inserts a text at a given position. If no position is specified, the text will be inserted after the cursor.
530
- * editor.exec('insertText', { text: 'Hello World!', from: 0, to: 0 });
531
- *
532
- * // Changes the format of a text block.
533
- * editor.exec('format', { tag: 'h2' });
534
- *
535
- * // Changes the font size of the selected text.
536
- * editor.exec('fontSize', 24);
537
- *
538
- * // Changes the content of the Editor.
539
- * editor.exec('setHTML', '<p>HTML content</p>');
540
- *
541
- * // Creates and inserts a table with the specified number of rows and columns. Numbers are zero based.
542
- * this.editor.exec("insertTable", { rows: 3, cols: 5 });
543
- * ```
544
- */
545
- EditorComponent.prototype.exec = function (commandName, attr) {
546
- // normalizes setHTML attributes
547
- if (commandName === 'setHTML' && typeof attr === 'string') {
548
- attr = {
549
- content: attr,
550
- parseOptions: {
551
- preserveWhitespace: this.preserveWhitespace
552
- }
553
- };
554
- }
555
- else if (['fontFamily', 'fontSize', 'foreColor', 'backColor', 'createLink'].some(function (name) { return name === commandName; })) {
556
- attr = {
557
- value: attr,
558
- applyToWord: this.applyToWord
559
- };
560
- }
561
- // Finds a command and applies the attributes.
562
- var command = editorCommands[commandName](attr);
563
- // Executes a ProseMirror command.
564
- command(this._view.state, this._view.dispatch, this._view);
565
- };
566
- /**
567
- * Opens a dialog.
568
- * @param {DialogCommand} dialogName - The name of the dialog that will open.
569
- *
570
- * The supported values are:
571
- * * `createLink`
572
- * * `viewSource`
573
- * * `insertFile`
574
- * * `insertImage`
575
- * * `tableWizard`
576
- *
577
- * @example
578
- * ```ts-no-run
579
- * // Opens a `createLink` dialog.
580
- * editor.openDialog('createLink');
581
- *
582
- * // Opens a `viewSource` dialog.
583
- * editor.openDialog('viewSource');
584
- * ```
585
- */
586
- EditorComponent.prototype.openDialog = function (dialogName) {
587
- var editorDialogs = {
588
- createLink: {
589
- content: FileLinkDialogComponent
590
- },
591
- insertFile: {
592
- content: FileLinkDialogComponent
593
- },
594
- insertImage: {
595
- content: ImageDialogComponent
596
- },
597
- viewSource: {
598
- content: SourceDialogComponent,
599
- height: 400,
600
- width: 500
601
- }
602
- // tableWizard: {
603
- // content: TableWizardDialogComponent
604
- // }
605
- };
606
- var dialog = Object.assign({ appendTo: this.dialogContainer }, editorDialogs[dialogName]);
607
- this.toolbar.toggle(false);
608
- var dialogContent = this.dialogService.open(dialog).content.instance;
609
- if (dialogName === 'createLink' || dialogName === 'insertFile') {
610
- dialogContent.command = dialogName;
611
- }
612
- dialogContent.editor = this;
613
- dialogContent.setData(this._view.state, { applyToWord: this.applyToWord });
614
- };
615
- /**
616
- * Manually focus the Editor.
617
- */
618
- EditorComponent.prototype.focus = function () {
619
- this.focusChangedProgrammatically = true;
620
- this._view.focus();
621
- this.focusChangedProgrammatically = false;
622
- };
623
- /**
624
- * Manually blur the Editor.
625
- */
626
- EditorComponent.prototype.blur = function () {
627
- this.focusChangedProgrammatically = true;
628
- this._view.dom.blur();
629
- this.focusChangedProgrammatically = false;
630
- };
631
- /**
632
- * @hidden
633
- */
634
- EditorComponent.prototype.getSource = function () {
635
- return getHtml(this._view.state);
636
- };
637
- EditorComponent.prototype.ngOnDestroy = function () {
638
- if (this.subs) {
639
- this.subs.unsubscribe();
640
- }
641
- if (this._styleObserver) {
642
- this._styleObserver.disconnect();
643
- }
644
- };
645
- /**
646
- * @hidden
647
- */
648
- EditorComponent.prototype.writeValue = function (value) {
649
- this.inForm = true;
650
- // To avoid confusion, non-existent values are always undefined.
651
- this.value = value === null ? undefined : value;
652
- };
653
- /**
654
- * @hidden
655
- */
656
- EditorComponent.prototype.registerOnChange = function (fn) {
657
- this.onChangeCallback = fn;
658
- };
659
- /**
660
- * @hidden
661
- */
662
- EditorComponent.prototype.registerOnTouched = function (fn) {
663
- this.onTouchedCallback = fn;
664
- };
665
- /**
666
- * @hidden
667
- * Used by the TextBoxContainer to determine if the component is empty.
668
- */
669
- EditorComponent.prototype.isEmpty = function () {
670
- return false;
671
- };
672
- EditorComponent.prototype.initialize = function () {
673
- var _this = this;
674
- if (!isDocumentAvailable()) {
675
- return;
676
- }
677
- var currentSchema = this.schema || schema;
678
- var containerNativeElement = this.container.element.nativeElement;
679
- var contentNode = parseContent((this.value || '').trim(), currentSchema, { preserveWhitespace: this.preserveWhitespace });
680
- if (this.iframe) {
681
- var iframeDoc_1 = containerNativeElement.contentDocument;
682
- var meta = iframeDoc_1.createElement('meta');
683
- meta.setAttribute('charset', 'utf-8');
684
- iframeDoc_1.head.appendChild(meta);
685
- [defaultStyle, tablesStyles, this.dir === 'rtl' ? rtlStyles : undefined].forEach(function (styles) {
686
- if (styles) {
687
- var style = iframeDoc_1.createElement('style');
688
- style.appendChild(iframeDoc_1.createTextNode(styles));
689
- iframeDoc_1.head.appendChild(style);
690
- }
691
- });
692
- var element = iframeDoc_1.createElement('div');
693
- element.classList.add('k-content');
694
- iframeDoc_1.body.appendChild(element);
695
- }
696
- else {
697
- var element = document.createElement('div');
698
- containerNativeElement.appendChild(element);
699
- }
700
- var defaultPlugins = [
701
- new Plugin({
702
- key: new PluginKey('editor-tabindex'),
703
- props: {
704
- attributes: function () { return ({
705
- // set tabindex when contenteditable is false, so that the content area can be selected
706
- tabIndex: _this.readonly ? '0' : ''
707
- }); }
708
- }
709
- }),
710
- new Plugin({
711
- key: new PluginKey('toolbar-tools-update'),
712
- view: function () { return ({
713
- update: function (editorView) {
714
- if (!_this.disabled) {
715
- _this.stateChange.next(_this.readonly ? disabledToolBarState : getToolbarState(editorView.state, { applyToWord: _this.applyToWord }));
716
- }
717
- }
718
- }); }
719
- }),
720
- history(),
721
- keymap(buildListKeymap(currentSchema)),
722
- keymap(buildKeymap(currentSchema, { applyToWord: this.applyToWord })),
723
- keymap(baseKeymap),
724
- gapCursor(),
725
- imageResizing(),
726
- tableEditing(),
727
- caretColor()
728
- ];
729
- if (this.placeholder) {
730
- defaultPlugins.push(placeholder(this.placeholder));
731
- }
732
- var state = EditorState.create({
733
- schema: currentSchema,
734
- doc: contentNode,
735
- plugins: isPresent(this.plugins) ? this.plugins(defaultPlugins) : defaultPlugins
736
- });
737
- if (this.iframe) {
738
- this.viewMountElement = containerNativeElement.contentDocument.querySelector('div');
739
- }
740
- else {
741
- this.viewMountElement = containerNativeElement.querySelector('div');
742
- }
743
- this.ngZone.runOutsideAngular(function () {
744
- _this._view = new EditorView({ mount: _this.viewMountElement }, {
745
- state: state,
746
- editable: function () { return !_this.readonly; },
747
- dispatchTransaction: _this.dispatchTransaction,
748
- transformPastedHTML: _this.transformPastedHTML,
749
- handleDOMEvents: {
750
- paste: _this.onPaste
751
- }
752
- });
753
- });
754
- if (this._view) {
755
- var containerElement = void 0;
756
- var contentAreaClasslist_1 = this.element.nativeElement.querySelector('.k-editor-content').classList;
757
- if (this.iframe) {
758
- containerElement = this.container.element.nativeElement.contentDocument;
759
- }
760
- else {
761
- containerElement = this.container.element.nativeElement;
762
- }
763
- this.subs.add(fromEvent(containerElement, 'focusin')
764
- .subscribe(function (e) {
765
- if (_this.readonly) {
766
- contentAreaClasslist_1.add('k-focus');
767
- }
768
- if (!_this.focusChangedProgrammatically || _this.shouldEmitFocus) {
769
- var relatedTarget = e.relatedTarget;
770
- var isActiveColorButton = relatedTarget && relatedTarget.classList.contains('k-colorpicker');
771
- if (!isActiveColorButton || _this.shouldEmitFocus) {
772
- _this.ngZone.run(function () { return _this.onFocus.emit(); });
773
- }
774
- _this.shouldEmitFocus = false;
775
- }
776
- }));
777
- this.subs.add(fromEvent(containerElement, 'focusout')
778
- .subscribe(function (e) {
779
- if (_this.readonly) {
780
- contentAreaClasslist_1.remove('k-focus');
781
- }
782
- if (!_this.focusChangedProgrammatically) {
783
- var relatedTarget = e.relatedTarget;
784
- var isActiveColorButton = relatedTarget && relatedTarget.classList.contains('k-colorpicker');
785
- if (!isActiveColorButton) {
786
- _this.ngZone.run(function () { return _this.onBlur.emit(); });
787
- }
788
- }
789
- }));
790
- }
791
- this.subs.add(this.stateChange.subscribe(function () {
792
- if (_this.userToolBarComponent) {
793
- _this.userToolBarComponent.cdr.detectChanges();
794
- }
795
- else {
796
- _this.cdr.detectChanges();
797
- }
798
- }));
799
- this.subs.add(this.valueModified.subscribe(function (value) {
800
- _this.onChangeCallback(value);
801
- _this.valueChange.emit(value);
802
- _this.cdr.markForCheck();
803
- }));
804
- this.subs.add(fromEvent(this.viewMountElement, 'keyup')
805
- .pipe(map(function (e) { return e.keyCode; }), filter(function (code) { return code === 121; }), // F10
806
- map(function () { return _this.userToolBarElement || _this.defaultToolbar; }))
807
- .subscribe(function (toolbar) { return toolbar.nativeElement.focus(); }));
808
- this.subs.add(fromEvent(this.viewMountElement, 'blur')
809
- .pipe(filter(function (event) { return !_this.viewMountElement.contains(event.relatedTarget); }))
810
- .subscribe(function () { return _this.onTouchedCallback(); }));
811
- };
812
- EditorComponent.prototype.normalizeSize = function () {
813
- var _this = this;
814
- if (typeof this.resizable === 'object' && !this._styleObserver) {
815
- var element_1 = this.element.nativeElement;
816
- this._styleObserver = new MutationObserver(function () {
817
- _this.ngZone.runOutsideAngular(function () { return _this.normalizeProperties(element_1); });
818
- });
819
- this._styleObserver.observe(element_1, { attributeFilter: ['style'] });
820
- }
821
- };
822
- EditorComponent.prototype.normalizeProperties = function (element) {
823
- var props = Object.keys(this.resizable);
824
- var pixelWidth = parseInt(element.style.width, 10);
825
- var pixelHeight = parseInt(element.style.height, 10);
826
- var resizable = this.resizable;
827
- props.forEach(function (prop) {
828
- var isMinProp = prop.startsWith('min');
829
- var isMaxProp = !isMinProp;
830
- var isWidthProp = prop.endsWith('Width');
831
- var isHeightProp = !isWidthProp;
832
- if (isMinProp && isWidthProp) {
833
- if (pixelWidth < resizable.minWidth) {
834
- element.style.width = resizable.minWidth + 'px';
835
- }
836
- }
837
- else if (isMinProp && isHeightProp) {
838
- if (pixelHeight < resizable.minHeight) {
839
- element.style.height = resizable.minHeight + 'px';
840
- }
841
- }
842
- else if (isMaxProp && isWidthProp) {
843
- if (pixelWidth > resizable.maxWidth) {
844
- element.style.width = resizable.maxWidth + 'px';
845
- }
846
- }
847
- else {
848
- if (pixelHeight > resizable.maxHeight) {
849
- element.style.height = resizable.maxHeight + 'px';
850
- }
851
- }
852
- });
853
- };
854
- var EditorComponent_1;
855
- tslib_1.__decorate([
856
- Input(),
857
- tslib_1.__metadata("design:type", String),
858
- tslib_1.__metadata("design:paramtypes", [String])
859
- ], EditorComponent.prototype, "value", null);
860
- tslib_1.__decorate([
861
- Input(),
862
- tslib_1.__metadata("design:type", Boolean),
863
- tslib_1.__metadata("design:paramtypes", [Boolean])
864
- ], EditorComponent.prototype, "disabled", null);
865
- tslib_1.__decorate([
866
- Input(),
867
- tslib_1.__metadata("design:type", Boolean),
868
- tslib_1.__metadata("design:paramtypes", [Boolean])
869
- ], EditorComponent.prototype, "readonly", null);
870
- tslib_1.__decorate([
871
- Input(),
872
- tslib_1.__metadata("design:type", Boolean)
873
- ], EditorComponent.prototype, "iframe", void 0);
874
- tslib_1.__decorate([
875
- Input(),
876
- tslib_1.__metadata("design:type", Object)
877
- ], EditorComponent.prototype, "applyToWord", void 0);
878
- tslib_1.__decorate([
879
- Input(),
880
- tslib_1.__metadata("design:type", Schema),
881
- tslib_1.__metadata("design:paramtypes", [Schema])
882
- ], EditorComponent.prototype, "schema", null);
883
- tslib_1.__decorate([
884
- Input(),
885
- tslib_1.__metadata("design:type", Function),
886
- tslib_1.__metadata("design:paramtypes", [Function])
887
- ], EditorComponent.prototype, "plugins", null);
888
- tslib_1.__decorate([
889
- Input(),
890
- tslib_1.__metadata("design:type", String),
891
- tslib_1.__metadata("design:paramtypes", [String])
892
- ], EditorComponent.prototype, "placeholder", null);
893
- tslib_1.__decorate([
894
- Input(),
895
- tslib_1.__metadata("design:type", Object)
896
- ], EditorComponent.prototype, "preserveWhitespace", void 0);
897
- tslib_1.__decorate([
898
- Input(),
899
- tslib_1.__metadata("design:type", Object)
900
- ], EditorComponent.prototype, "pasteCleanupSettings", void 0);
901
- tslib_1.__decorate([
902
- Input(),
903
- tslib_1.__metadata("design:type", Object)
904
- ], EditorComponent.prototype, "resizable", void 0);
905
- tslib_1.__decorate([
906
- Output(),
907
- tslib_1.__metadata("design:type", EventEmitter)
908
- ], EditorComponent.prototype, "valueChange", void 0);
909
- tslib_1.__decorate([
910
- Output('focus'),
911
- tslib_1.__metadata("design:type", EventEmitter)
912
- ], EditorComponent.prototype, "onFocus", void 0);
913
- tslib_1.__decorate([
914
- Output(),
915
- tslib_1.__metadata("design:type", EventEmitter)
916
- ], EditorComponent.prototype, "paste", void 0);
917
- tslib_1.__decorate([
918
- Output('blur'),
919
- tslib_1.__metadata("design:type", EventEmitter)
920
- ], EditorComponent.prototype, "onBlur", void 0);
921
- tslib_1.__decorate([
922
- HostBinding('class.k-editor'),
923
- tslib_1.__metadata("design:type", Boolean)
924
- ], EditorComponent.prototype, "hostClass", void 0);
925
- tslib_1.__decorate([
926
- HostBinding('class.k-editor-resizable'),
927
- tslib_1.__metadata("design:type", Boolean),
928
- tslib_1.__metadata("design:paramtypes", [])
929
- ], EditorComponent.prototype, "resizableClass", null);
930
- tslib_1.__decorate([
931
- HostBinding('class.k-disabled'),
932
- tslib_1.__metadata("design:type", Boolean),
933
- tslib_1.__metadata("design:paramtypes", [])
934
- ], EditorComponent.prototype, "isDisabled", null);
935
- tslib_1.__decorate([
936
- HostBinding('class.k-readonly'),
937
- tslib_1.__metadata("design:type", Boolean),
938
- tslib_1.__metadata("design:paramtypes", [])
939
- ], EditorComponent.prototype, "isReadonly", null);
940
- tslib_1.__decorate([
941
- HostBinding('class.k-ie'),
942
- tslib_1.__metadata("design:type", Boolean),
943
- tslib_1.__metadata("design:paramtypes", [])
944
- ], EditorComponent.prototype, "isIE", null);
945
- tslib_1.__decorate([
946
- HostBinding('attr.dir'),
947
- tslib_1.__metadata("design:type", String),
948
- tslib_1.__metadata("design:paramtypes", [])
949
- ], EditorComponent.prototype, "dir", null);
950
- tslib_1.__decorate([
951
- HostBinding('attr.ariaDisabled'),
952
- tslib_1.__metadata("design:type", Boolean),
953
- tslib_1.__metadata("design:paramtypes", [])
954
- ], EditorComponent.prototype, "ariaDisabled", null);
955
- tslib_1.__decorate([
956
- HostBinding('style.minWidth'),
957
- tslib_1.__metadata("design:type", String),
958
- tslib_1.__metadata("design:paramtypes", [])
959
- ], EditorComponent.prototype, "minWidth", null);
960
- tslib_1.__decorate([
961
- HostBinding('style.maxWidth'),
962
- tslib_1.__metadata("design:type", String),
963
- tslib_1.__metadata("design:paramtypes", [])
964
- ], EditorComponent.prototype, "maxWidth", null);
965
- tslib_1.__decorate([
966
- HostBinding('style.minHeight'),
967
- tslib_1.__metadata("design:type", String),
968
- tslib_1.__metadata("design:paramtypes", [])
969
- ], EditorComponent.prototype, "minHeight", null);
970
- tslib_1.__decorate([
971
- HostBinding('style.maxHeight'),
972
- tslib_1.__metadata("design:type", String),
973
- tslib_1.__metadata("design:paramtypes", [])
974
- ], EditorComponent.prototype, "maxHeight", null);
975
- tslib_1.__decorate([
976
- ContentChild(ToolBarComponent, { static: false }),
977
- tslib_1.__metadata("design:type", ToolBarComponent)
978
- ], EditorComponent.prototype, "userToolBarComponent", void 0);
979
- tslib_1.__decorate([
980
- ContentChild(ToolBarComponent, { read: ElementRef, static: false }),
981
- tslib_1.__metadata("design:type", ElementRef)
982
- ], EditorComponent.prototype, "userToolBarElement", void 0);
983
- tslib_1.__decorate([
984
- ViewChild('dialogsContainer', { read: ViewContainerRef, static: true }),
985
- tslib_1.__metadata("design:type", ViewContainerRef)
986
- ], EditorComponent.prototype, "dialogContainer", void 0);
987
- tslib_1.__decorate([
988
- ViewChild('content', { read: ViewContainerRef, static: false }),
989
- tslib_1.__metadata("design:type", ViewContainerRef)
990
- ], EditorComponent.prototype, "container", void 0);
991
- tslib_1.__decorate([
992
- ViewChild('defaultToolbar', { read: ElementRef, static: false }),
993
- tslib_1.__metadata("design:type", ElementRef)
994
- ], EditorComponent.prototype, "defaultToolbar", void 0);
995
- tslib_1.__decorate([
996
- ViewChild('defaultToolbar', { read: ToolBarComponent, static: false }),
997
- tslib_1.__metadata("design:type", ToolBarComponent)
998
- ], EditorComponent.prototype, "defaultToolbarComponent", void 0);
999
- EditorComponent = EditorComponent_1 = tslib_1.__decorate([
1000
- Component({
1001
- selector: 'kendo-editor',
1002
- providers: [
1003
- EditorLocalizationService,
1004
- EditorToolsService,
1005
- {
1006
- provide: LocalizationService,
1007
- useExisting: EditorLocalizationService
1008
- },
1009
- {
1010
- provide: L10N_PREFIX,
1011
- useValue: 'kendo.editor'
1012
- },
1013
- {
1014
- provide: NG_VALUE_ACCESSOR,
1015
- useExisting: forwardRef(function () { return EditorComponent_1; }),
1016
- multi: true
1017
- },
1018
- {
1019
- provide: KendoInput,
1020
- useExisting: forwardRef(function () { return EditorComponent_1; })
1021
- }
1022
- ],
1023
- /* tslint:disable:max-line-length */
1024
- template: "\n <ng-container\n kendoEditorLocalizedMessages\n i18n-alignCenter=\"kendo.editor.alignCenter|The title of the tool that aligns text in the center.\"\n alignCenter=\"Center text\"\n i18n-alignJustify=\"kendo.editor.alignJustify|The title of the tool that justifies text both left and right.\"\n alignJustify=\"Justify\"\n i18n-alignLeft=\"kendo.editor.alignLeft|The title of the tool that aligns text on the left.\"\n alignLeft=\"Align text left\"\n i18n-alignRight=\"kendo.editor.alignRight|The title of the tool that aligns text on the right.\"\n alignRight=\"Align text right\"\n i18n-backColor=\"kendo.editor.backColor|The title of the tool that changes the text background color.\"\n backColor=\"Background color\"\n i18n-blockquote=\"kendo.editor.blockquote|The title of the tool that wraps an element in a blockquote\"\n blockquote=\"Quotation\"\n i18n-bold=\"kendo.editor.bold|The title of the tool that makes text bold.\"\n bold=\"Bold\"\n i18n-cleanFormatting=\"kendo.editor.cleanFormatting|The title of the Clean Formatting tool.\"\n cleanFormatting=\"Clean formatting\"\n i18n-createLink=\"kendo.editor.createLink|The title of the tool that creates hyperlinks.\"\n createLink=\"Insert link\"\n i18n-dialogApply=\"kendo.editor.dialogApply|The label of the **Apply** button in all editor dialogs.\"\n dialogApply=\"Apply\"\n i18n-dialogCancel=\"kendo.editor.dialogCancel|The label of the **Cancel** button in all editor dialogs.\"\n dialogCancel=\"Cancel\"\n i18n-dialogInsert=\"kendo.editor.dialogInsert|The label of the **Insert** button in all editor dialogs.\"\n dialogInsert=\"Insert\"\n i18n-dialogUpdate=\"kendo.editor.dialogUpdate|The label of the **Update** button in all editor dialogs.\"\n dialogUpdate=\"Update\"\n i18n-fileText=\"kendo.editor.fileText|The caption for the file text in the insertFile dialog.\"\n fileText=\"Text\"\n i18n-fileTitle=\"kendo.editor.fileTitle|The caption for the file Title in the insertFile dialog.\"\n fileTitle=\"Title\"\n i18n-fileWebAddress=\"kendo.editor.fileWebAddress|The caption for the file URL in the insertFile dialog.\"\n fileWebAddress=\"Web address\"\n i18n-fontFamily=\"kendo.editor.fontFamily|The title of the tool that changes the text font.\"\n fontFamily=\"Select font family\"\n i18n-fontSize=\"kendo.editor.fontSize|The title of the tool that changes the text size.\"\n fontSize=\"Select font size\"\n i18n-foreColor=\"kendo.editor.foreColor|The title of the tool that changes the text color.\"\n foreColor=\"Color\"\n i18n-format=\"kendo.editor.format|The title of the tool that lets users choose block formats.\"\n format=\"Format\"\n i18n-imageAltText=\"kendo.editor.imageAltText|The caption for the image alternate text in the insertImage dialog.\"\n imageAltText=\"Alternate text\"\n i18n-imageHeight=\"kendo.editor.imageHeight|The caption for the image height in the insertImage dialog.\"\n imageHeight=\"Height (px)\"\n i18n-imageWebAddress=\"kendo.editor.imageWebAddress|The caption for the image URL in the insertImage dialog.\"\n imageWebAddress=\"Web address\"\n i18n-imageWidth=\"kendo.editor.imageWidth|The caption for the image width in the insertImage dialog.\"\n imageWidth=\"Width (px)\"\n i18n-indent=\"kendo.editor.indent|The title of the tool that indents the content.\"\n indent=\"Indent\"\n i18n-insertFile=\"kendo.editor.insertFile|The title of the tool that inserts links to files.\"\n insertFile=\"Insert file\"\n i18n-insertImage=\"kendo.editor.insertImage|The title of the tool that inserts images.\"\n insertImage=\"Insert image\"\n i18n-insertOrderedList=\"kendo.editor.insertOrderedList|The title of the tool that inserts an ordered list.\"\n insertOrderedList=\"Insert ordered list\"\n i18n-insertUnorderedList=\"kendo.editor.insertUnorderedList|The title of the tool that inserts an unordered list.\"\n insertUnorderedList=\"Insert unordered list\"\n i18n-italic=\"kendo.editor.italic|The title of the tool that makes text italicized.\"\n italic=\"Italic\"\n i18n-linkOpenInNewWindow=\"kendo.editor.linkOpenInNewWindow|The caption for the checkbox for opening the link in a new window in the createLink dialog.\"\n linkOpenInNewWindow=\"Open link in new window\"\n i18n-linkText=\"kendo.editor.linkText|The caption for the link text in the createLink dialog.\"\n linkText=\"Text\"\n i18n-linkTitle=\"kendo.editor.linkTitle|The caption for the link title in the createLink dialog.\"\n linkTitle=\"Title\"\n i18n-linkWebAddress=\"kendo.editor.linkWebAddress|The caption for the URL in the createLink dialog.\"\n linkWebAddress=\"Web address\"\n i18n-outdent=\"kendo.editor.outdent|The title of the tool that outdents the content.\"\n outdent=\"Outdent\"\n i18n-print=\"kendo.editor.print|The title of the print tool.\"\n print=\"Print\"\n i18n-redo=\"kendo.editor.redo|The title of the tool that undos the last action.\"\n redo=\"Redo\"\n i18n-selectAll=\"kendo.editor.selectAll|The title of the tool that selects all content.\"\n selectAll=\"Select All\"\n i18n-strikethrough=\"kendo.editor.strikethrough|The title of the tool that strikes through text.\"\n strikethrough=\"Strikethrough\"\n i18n-subscript=\"kendo.editor.subscript|The title of the tool that makes text subscript.\"\n subscript=\"Subscript\"\n i18n-superscript=\"kendo.editor.superscript|The title of the tool that makes text superscript.\"\n superscript=\"Superscript\"\n i18n-underline=\"kendo.editor.underline|The title of the tool that underlines text.\"\n underline=\"Underline\"\n i18n-unlink=\"kendo.editor.unlink|The title of the tool that removes hyperlinks.\"\n unlink=\"Remove Link\"\n i18n-undo=\"kendo.editor.undo|The title of the tool that undos the last action.\"\n undo=\"Undo\"\n i18n-viewSource=\"kendo.editor.viewSource|The title of the tool that shows the editor value as HTML.\"\n viewSource=\"View source\"\n i18n-insertTable=\"kendo.editor.insertTable|The title of the tool that inserts table.\"\n insertTable=\"Insert Table\"\n i18n-addColumnBefore=\"kendo.editor.addColumnBefore|The title of the tool that adds new column before currently selected column.\"\n addColumnBefore=\"Add column before\"\n i18n-addColumnAfter=\"kendo.editor.addColumnAfter|The title of the tool that adds new column after currently selected column.\"\n addColumnAfter=\"Add column after\"\n i18n-addRowBefore=\"kendo.editor.addRowBefore|The title of the tool that adds new row before currently selected row.\"\n addRowBefore=\"Add row before\"\n i18n-addRowAfter=\"kendo.editor.addRowAfter|The title of the tool that adds new row after currently selected row.\"\n addRowAfter=\"Add row after\"\n i18n-deleteColumn=\"kendo.editor.deleteColumn|The title of the tool that deletes a table column.\"\n deleteColumn=\"Delete column\"\n i18n-deleteRow=\"kendo.editor.deleteRow|The title of the tool that deletes a table row.\"\n deleteRow=\"Delete row\"\n i18n-deleteTable=\"kendo.editor.deleteTable|The title of the tool that deletes a table.\"\n deleteTable=\"Delete table\"\n >\n </ng-container>\n\n <ng-content select=\"kendo-toolbar\"></ng-content>\n <kendo-toolbar [overflow]=\"true\" [tabindex]=\"readonly ? -1 : 0\" *ngIf=\"!userToolBarElement\" #defaultToolbar>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-dropdownlist kendoEditorFormat></kendo-toolbar-dropdownlist>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorIndentButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorOutdentButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorCreateLinkButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnlinkButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertImageButton></kendo-toolbar-button>\n </kendo-toolbar>\n\n <div *ngIf=\"!iframe\" #content [attr.dir]=\"direction\" class=\"k-editor-content\"></div>\n\n <div class=\"k-editor-content\" *ngIf=\"iframe\">\n <iframe #content srcdoc=\"<!DOCTYPE html>\" frameborder=\"0\" class=\"k-iframe\" (load)=\"iframeOnLoad()\"></iframe>\n </div>\n\n <ng-container #dialogsContainer></ng-container>\n ",
1025
- styles: [
1026
- "\n >>> .k-editor-content > .ProseMirror {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n outline: none;\n overflow: auto;\n }\n\n .k-iframe {\n width: 100%;\n height: 100%;\n display: block;\n }\n "
1027
- ]
1028
- }),
1029
- tslib_1.__metadata("design:paramtypes", [DialogService,
1030
- LocalizationService,
1031
- ChangeDetectorRef,
1032
- NgZone,
1033
- ElementRef,
1034
- EditorToolsService])
1035
- ], EditorComponent);
1036
- return EditorComponent;
1037
- }());
1038
- export { EditorComponent };
1039
- export { ɵ0 };