@componyx/ui 0.0.0-stage → 1.0.3

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 (169) hide show
  1. package/AppSkin/AppSkin.css +1268 -0
  2. package/AppSkin/AppSkin.js +2748 -0
  3. package/AppSkin/Themes/Default.css +241 -0
  4. package/Base/Base.js +3407 -0
  5. package/Base/ComponentIcons.css +66 -0
  6. package/Base/Font/ComponentIcons.woff +0 -0
  7. package/Base/Font/UI.woff +0 -0
  8. package/Base/Library.js +8432 -0
  9. package/Base/NavigationManager.js +462 -0
  10. package/Base/ResponsiveTemplates.js +371 -0
  11. package/Base/Sanitizer.js +288 -0
  12. package/Base/Themes/Default.css +255 -0
  13. package/Base/UI.css +618 -0
  14. package/Base/UIResourcePath.js +6 -0
  15. package/Bindary/Bindary.js +2011 -0
  16. package/Bindary/Modules/Connection.js +216 -0
  17. package/Bindary/Modules/Core.js +854 -0
  18. package/Bindary/Modules/DataUpdater.js +351 -0
  19. package/Bindary/Modules/ExpressionEngine.js +347 -0
  20. package/Bindary/Modules/ProxyManager.js +482 -0
  21. package/Bindary/Modules/Renderer.js +605 -0
  22. package/Bindary/Modules/Router.js +291 -0
  23. package/Bindary/Modules/Scroller.js +89 -0
  24. package/Bindary/Modules/Template.js +1273 -0
  25. package/BookmarkSpy/BookmarkSpy.js +430 -0
  26. package/Box/Box.css +36 -0
  27. package/Box/Box.js +1685 -0
  28. package/Button/Button.css +470 -0
  29. package/Button/Button.js +1398 -0
  30. package/Button/Themes/Default.css +200 -0
  31. package/Carousel/Carousel.css +273 -0
  32. package/Carousel/Carousel.js +607 -0
  33. package/ColorButton/ColorButton.css +39 -0
  34. package/ColorButton/ColorButton.js +336 -0
  35. package/ColorPicker/ColorPicker.css +359 -0
  36. package/ColorPicker/ColorPicker.js +972 -0
  37. package/ComboBox/ComboBox.css +357 -0
  38. package/ComboBox/ComboBox.js +2342 -0
  39. package/ComboBox/Themes/Default.css +23 -0
  40. package/DataPager/DataPager.css +72 -0
  41. package/DataPager/DataPager.js +674 -0
  42. package/DatePicker/DatePicker.css +227 -0
  43. package/DatePicker/DatePicker.js +1531 -0
  44. package/DatePicker/Themes/Default.css +26 -0
  45. package/Dialog/Dialog.css +106 -0
  46. package/Dialog/Dialog.js +572 -0
  47. package/Dialog/Themes/Default.css +10 -0
  48. package/Editor/Data/Emoji.json +8285 -0
  49. package/Editor/Data/Special.json +1042 -0
  50. package/Editor/Editor.css +1562 -0
  51. package/Editor/Editor.js +4058 -0
  52. package/Editor/Font/Editor.woff +0 -0
  53. package/Editor/Modules/ComponentFactory.js +565 -0
  54. package/Editor/Modules/ContentManager.js +748 -0
  55. package/Editor/Modules/DialogManager.js +1234 -0
  56. package/Editor/Modules/EventManager.js +458 -0
  57. package/Editor/Modules/Format.js +950 -0
  58. package/Editor/Modules/History.js +191 -0
  59. package/Editor/Modules/LayoutState.js +379 -0
  60. package/Editor/Modules/ListManager.js +296 -0
  61. package/Editor/Modules/MenuManager.js +388 -0
  62. package/Editor/Modules/NodeManager.js +681 -0
  63. package/Editor/Modules/ParagraphButtons.js +122 -0
  64. package/Editor/Modules/Resizer.js +176 -0
  65. package/Editor/Modules/SelectionRange.js +564 -0
  66. package/Editor/Modules/SourceViewBuilder.js +212 -0
  67. package/Editor/Modules/SymbolPicker.js +208 -0
  68. package/Editor/Modules/Table.js +2327 -0
  69. package/Editor/Modules/TableDialog.js +757 -0
  70. package/Editor/Modules/Toolbar.js +375 -0
  71. package/Editor/Modules/TooltipMenu.js +125 -0
  72. package/Editor/Modules/Utility.js +131 -0
  73. package/Editor/Themes/Default.css +204 -0
  74. package/FileUpload/FileUpload.css +156 -0
  75. package/FileUpload/FileUpload.js +898 -0
  76. package/FileUpload/Themes/Default.css +17 -0
  77. package/Form/Form.css +1934 -0
  78. package/Form/Form.js +4943 -0
  79. package/Form/Modules/ActionManager.js +368 -0
  80. package/Form/Modules/BuildPanelManager.js +319 -0
  81. package/Form/Modules/ComponentFactory.js +468 -0
  82. package/Form/Modules/ComponentPanel.js +265 -0
  83. package/Form/Modules/ConfigPanelManager.js +685 -0
  84. package/Form/Modules/DataObserver.js +717 -0
  85. package/Form/Modules/Databinder.js +602 -0
  86. package/Form/Modules/Draggable.js +756 -0
  87. package/Form/Modules/OptionsPanel.js +342 -0
  88. package/Form/Modules/Renderer.js +1889 -0
  89. package/Form/Modules/RuleEngine.js +585 -0
  90. package/Form/Modules/RulesPanel.js +1158 -0
  91. package/Form/Modules/Types.js +1709 -0
  92. package/Form/Modules/ValidationManager.js +194 -0
  93. package/Form/Themes/Default.css +216 -0
  94. package/FormField/FormField.css +468 -0
  95. package/FormField/FormField.js +576 -0
  96. package/FormField/Themes/Default.css +99 -0
  97. package/Grid/Grid.css +544 -0
  98. package/Grid/Grid.js +3761 -0
  99. package/Grid/Themes/Default.css +43 -0
  100. package/LICENSE +126 -0
  101. package/MaskedTextBox/MaskedTextBox.css +28 -0
  102. package/MaskedTextBox/MaskedTextBox.js +642 -0
  103. package/MaskedTextBox/Themes/Default.css +6 -0
  104. package/Menu/Menu.css +328 -0
  105. package/Menu/Menu.js +2386 -0
  106. package/Menu/Themes/Default.css +24 -0
  107. package/NumericBox/NumericBox.css +120 -0
  108. package/NumericBox/NumericBox.js +984 -0
  109. package/PanelBar/PanelBar.css +123 -0
  110. package/PanelBar/PanelBar.js +505 -0
  111. package/PanelBar/Themes/Default.css +51 -0
  112. package/PieChart/PieChart.css +95 -0
  113. package/PieChart/PieChart.js +820 -0
  114. package/PieChart/Themes/Default.css +9 -0
  115. package/README.md +178 -3
  116. package/Slider/Slider.css +348 -0
  117. package/Slider/Slider.js +1306 -0
  118. package/Slider/Themes/Default.css +44 -0
  119. package/TabStrip/TabStrip.css +52 -0
  120. package/TabStrip/TabStrip.js +362 -0
  121. package/TabStrip/Themes/Default.css +35 -0
  122. package/TimePicker/Themes/Default.css +30 -0
  123. package/TimePicker/TimePicker.css +253 -0
  124. package/TimePicker/TimePicker.js +1485 -0
  125. package/TooltipManager/Themes/Default.css +21 -0
  126. package/TooltipManager/TooltipManager.css +227 -0
  127. package/TooltipManager/TooltipManager.js +791 -0
  128. package/Validator/Validator.css +54 -0
  129. package/Validator/Validator.js +2508 -0
  130. package/componyx.html-data.json +619 -0
  131. package/index.js +27 -0
  132. package/package.json +43 -4
  133. package/types/AppSkin.d.ts +842 -0
  134. package/types/Base.d.ts +1034 -0
  135. package/types/Bindary.d.ts +1196 -0
  136. package/types/BookmarkSpy.d.ts +112 -0
  137. package/types/Box.d.ts +374 -0
  138. package/types/Button.d.ts +455 -0
  139. package/types/Carousel.d.ts +136 -0
  140. package/types/ColorButton.d.ts +120 -0
  141. package/types/ColorPicker.d.ts +225 -0
  142. package/types/ComboBox.d.ts +507 -0
  143. package/types/DataPager.d.ts +152 -0
  144. package/types/DatePicker.d.ts +354 -0
  145. package/types/Dialog.d.ts +160 -0
  146. package/types/Editor.d.ts +1289 -0
  147. package/types/FileUpload.d.ts +206 -0
  148. package/types/Form.d.ts +3078 -0
  149. package/types/FormField.d.ts +204 -0
  150. package/types/Grid.d.ts +911 -0
  151. package/types/Library.d.ts +1899 -0
  152. package/types/MaskedTextBox.d.ts +91 -0
  153. package/types/Menu.d.ts +577 -0
  154. package/types/NumericBox.d.ts +310 -0
  155. package/types/PanelBar.d.ts +223 -0
  156. package/types/PieChart.d.ts +224 -0
  157. package/types/ResponsiveTemplates.d.ts +108 -0
  158. package/types/Slider.d.ts +227 -0
  159. package/types/TabStrip.d.ts +185 -0
  160. package/types/TimePicker.d.ts +265 -0
  161. package/types/TooltipManager.d.ts +178 -0
  162. package/types/UI.d.ts +29 -0
  163. package/types/Validator.d.ts +653 -0
  164. package/types/index.d.ts +59 -0
  165. package/ui.css +11783 -0
  166. package/ui.js +79477 -0
  167. package/ui.min.css +138 -0
  168. package/ui.min.js +264 -0
  169. package/ui.min.js.map +1 -0
@@ -0,0 +1,1289 @@
1
+ declare namespace componyx
2
+ {
3
+ namespace UI
4
+ {
5
+ /**
6
+ * <p>Namespace for editor modules.</p>
7
+ */
8
+ namespace editor_modules
9
+ {
10
+ /**
11
+ * <p>Promise that resolves when all editor modules are loaded asynchronously.</p>
12
+ */
13
+ var loaded: Promise<void>;
14
+
15
+ /**
16
+ * <p>Provides utilities for working with the DOM selection and ranges within the editor document.
17
+ * Use this in custom commands to get and restore the selection range.</p>
18
+ * <p>Available as editor.selectionRange; not constructed directly.</p>
19
+ */
20
+ class SelectionRange
21
+ {
22
+ private constructor();
23
+ /**
24
+ * <p>Gets the selection object of the editor document (the iframe selection when iframe is set to true).</p>
25
+ */
26
+ getSelection(): Selection;
27
+ /**
28
+ * <p>Gets the active selection range. If there is no selection, a collapsed range at the start of the content is created.</p>
29
+ */
30
+ getRange(): Range;
31
+ /**
32
+ * <p>Restores the selection range to the provided range.</p>
33
+ * @param range - <p>The range to select.</p>
34
+ * @returns <p>The selection range.</p>
35
+ */
36
+ restoreRange(range: Range): Range;
37
+ /**
38
+ * <p>Selects the contents of the specified node.</p>
39
+ * @param node - <p>The node whose contents are selected.</p>
40
+ * @returns <p>The selection range.</p>
41
+ */
42
+ selectNodeContents(node: Node): Range;
43
+ /**
44
+ * <p>Collapses the selection range to the start or end of the specified node.</p>
45
+ * @param node - <p>The node to collapse to.</p>
46
+ * @param [toStart = false] - <p>True to collapse to the start of the node, false to collapse to the end.</p>
47
+ * @returns <p>The selection range.</p>
48
+ */
49
+ collapseRangeToNode(node: Node, toStart?: boolean): Range;
50
+ /**
51
+ * <p>Gets the HTML of the contents within the specified range.</p>
52
+ * @param range - <p>The range.</p>
53
+ * @returns <p>The selected HTML.</p>
54
+ */
55
+ getSelectedHTML(range: Range): string;
56
+ }
57
+
58
+ /**
59
+ * <p>Provides utilities for querying DOM nodes within the editor document.
60
+ * Useful for writing isActive functions of custom commands.</p>
61
+ * <p>Available as editor.nodeManager; not constructed directly.</p>
62
+ */
63
+ class NodeManager
64
+ {
65
+ private constructor();
66
+ /**
67
+ * <p>Returns a value indicating if the node is a link node (an A element with an href).</p>
68
+ * @param node - <p>The node.</p>
69
+ */
70
+ isLink(node: Node): boolean;
71
+ /**
72
+ * <p>Returns a value indicating if the node is an image container: an element with a direct child IMG element (typically the FIGURE).
73
+ * Note: returns false for the IMG element itself.</p>
74
+ * @param node - <p>The node.</p>
75
+ */
76
+ isImage(node: Node): boolean;
77
+ /**
78
+ * <p>Returns a value indicating if the node is a media node (a FIGURE element created by the media command).</p>
79
+ * @param node - <p>The node.</p>
80
+ */
81
+ isMedia(node: Node): boolean;
82
+ /**
83
+ * <p>Returns a value indicating if the node is a bookmark node (an A element with an id and without an href).</p>
84
+ * @param node - <p>The node.</p>
85
+ */
86
+ isBookmark(node: Node): boolean;
87
+ /**
88
+ * <p>Returns a value indicating if the node name matches the tag (case-insensitive).</p>
89
+ * @param tag - <p>The tag or list of tags to match.</p>
90
+ * @param node - <p>The node.</p>
91
+ */
92
+ isTagMatch(tag: string | string[], node: Node): boolean;
93
+ /**
94
+ * <p>Gets the root (block-level) node for the specified node.</p>
95
+ * @param node - <p>The node.</p>
96
+ * @returns <p>The root node.</p>
97
+ */
98
+ getRootNode(node: Node): HTMLElement;
99
+ /**
100
+ * <p>Walks up from the start node until a node matches the specified condition, stopping at the root node.</p>
101
+ * @param startNode - <p>The node to start from.</p>
102
+ * @param rootNode - <p>The highest node in the tree to check.</p>
103
+ * @param isMatch - <p>The condition a node must match.</p>
104
+ * @returns <p>The matching node, or null if no node matches.</p>
105
+ */
106
+ getMatchingNode(startNode: Node, rootNode: Node, isMatch: (node: Node) => boolean): Node | null;
107
+ }
108
+
109
+ /**
110
+ * <p>Manages the undo/redo history stack.</p>
111
+ * <p>Available as editor.history; not constructed directly.</p>
112
+ */
113
+ class History
114
+ {
115
+ private constructor();
116
+ /**
117
+ * <p>Adds a history item (undo step) for the current document state and selection.
118
+ * Call this at the end of every custom command that mutates the document directly, otherwise undo will not work correctly.
119
+ * Editor methods such as insert(), toggleLayoutNode() and setBlock() add their own history item.</p>
120
+ */
121
+ addItem(): void;
122
+ /**
123
+ * <p>Invokes the specified method without registering history items.
124
+ * Use this to combine several editor operations into a single undo step: call the operations inside noHistory() and call addItem() once afterwards.</p>
125
+ * @param method - <p>The method to invoke.</p>
126
+ * @returns <p>The result of the invoked method.</p>
127
+ */
128
+ noHistory<T>(method: () => T): T;
129
+ }
130
+
131
+ /**
132
+ * <p>Tracks the current layout state of the editor, including the active selection context (link, image, media, active formats).</p>
133
+ * <p>Available as editor.layoutState; not constructed directly.</p>
134
+ */
135
+ class LayoutState
136
+ {
137
+ private constructor();
138
+ /**
139
+ * <p>The layout state of the current selection. Read-only: update it via getState().</p>
140
+ */
141
+ readonly activeLayout: componyx.UI.Editor.ActiveLayout;
142
+ /**
143
+ * <p>Updates the layout state from the current selection and syncs the toolbar.
144
+ * Call this after mutations that affect the active layout.</p>
145
+ */
146
+ getState(): void;
147
+ }
148
+ }
149
+
150
+ namespace Editor
151
+ {
152
+ /**
153
+ * @property [id] - <p>The identifier of the content editable element.</p>
154
+ * @property [element] - <p>The HTML element instead of the identifier.</p>
155
+ * @property [toolbarDisplay] - <p>The toolbar display for the editable element.</p>
156
+ */
157
+ type EditableElement = {
158
+ id?: string;
159
+ element?: HTMLElement;
160
+ toolbarDisplay?: ToolbarDisplayOption;
161
+ };
162
+
163
+ /**
164
+ * <p>The text labels used by the editor.</p>
165
+ */
166
+ type LabelSettings = {
167
+ comboBoxPlaceholderEditable?: string;
168
+ comboBoxPlaceholderReadOnly?: string;
169
+ alignLeft?: string;
170
+ alignCenter?: string;
171
+ alignRight?: string;
172
+ alignJustify?: string;
173
+ alignTop?: string;
174
+ alignMiddle?: string;
175
+ alignBottom?: string;
176
+ borderStyleNone?: string;
177
+ borderStyleSolid?: string;
178
+ borderStyleDashed?: string;
179
+ borderStyleDotted?: string;
180
+ borderStyleDouble?: string;
181
+ dialogConfirm?: string;
182
+ dialogCancel?: string;
183
+ sourceViewDialogHeader?: string;
184
+ sourceViewRootItem?: string;
185
+ bookmarkDialogHeader?: string;
186
+ bookmarkInputPlaceholder?: string;
187
+ bookmarkPrefix?: string;
188
+ symbolSearchInputPlaceholder?: string;
189
+ linkDialogHeader?: string;
190
+ linkHref?: string;
191
+ linkText?: string;
192
+ linkTitle?: string;
193
+ linkTarget?: string;
194
+ linkTargetCurrent?: string;
195
+ linkTargetNew?: string;
196
+ linkDownloadable?: string;
197
+ removeLink?: string;
198
+ imageDialogHeader?: string;
199
+ imageSource?: string;
200
+ imageAlt?: string;
201
+ imageWidth?: string;
202
+ imageHeight?: string;
203
+ imageAlignment?: string;
204
+ imageAlignLeft?: string;
205
+ imageAlignCenter?: string;
206
+ imageAlignRight?: string;
207
+ imageInlineAlignDefaultTop?: string;
208
+ imageInlineAlignDefaultCenter?: string;
209
+ imageInlineAlignDefaultBottom?: string;
210
+ imageInlineAlignLeft?: string;
211
+ imageInlineAlignRight?: string;
212
+ imageInline?: string;
213
+ imageFileButtonTooltip?: string;
214
+ imageConstrainButtonTooltip?: string;
215
+ mediaDialogHeader?: string;
216
+ mediaSource?: string;
217
+ mediaEmbed?: string;
218
+ mediaWidth?: string;
219
+ comboBoxNoResult?: string;
220
+ default?: string;
221
+ emojiSymbolCategories?: string[];
222
+ specialSymbolCategories?: string[];
223
+ tableDialogHeader?: string;
224
+ tableDialogCategoryTable?: string;
225
+ tableDialogCategoryRow?: string;
226
+ tableDialogCategoryCell?: string;
227
+ tableWidth?: string;
228
+ tableAlignment?: string;
229
+ tableCellSpacing?: string;
230
+ tableCellPadding?: string;
231
+ headerRow?: string;
232
+ footerRow?: string;
233
+ rowHeight?: string;
234
+ cellWidth?: string;
235
+ cellHeight?: string;
236
+ cellPadding?: string;
237
+ caption?: string;
238
+ bgColor?: string;
239
+ borderWidth?: string;
240
+ borderStyle?: string;
241
+ borderColor?: string;
242
+ verticalAlign?: string;
243
+ horizontalAlign?: string;
244
+ tableMenuCut?: string;
245
+ tableMenuCopy?: string;
246
+ tableMenuPaste?: string;
247
+ tableMenuPastePlainText?: string;
248
+ tableMenuRow?: string;
249
+ tableMenuAddRowAbove?: string;
250
+ tableMenuAddRowBelow?: string;
251
+ tableMenuRemoveRow?: string;
252
+ tableMenuColumn?: string;
253
+ tableMenuAddColumnLeft?: string;
254
+ tableMenuAddColumnRight?: string;
255
+ tableMenuRemoveColumn?: string;
256
+ tableMenuMerge?: string;
257
+ tableMenuMergeSelection?: string;
258
+ tableMenuMergeRight?: string;
259
+ tableMenuMergeDown?: string;
260
+ tableMenuSplit?: string;
261
+ tableMenuSettings?: string;
262
+ tableMenuDelete?: string;
263
+ undoCommandTooltip?: string;
264
+ redoCommandTooltip?: string;
265
+ boldCommandTooltip?: string;
266
+ italicCommandTooltip?: string;
267
+ underlineCommandTooltip?: string;
268
+ strikeThroughCommandTooltip?: string;
269
+ fontColorCommandTooltip?: string;
270
+ fontBGColorCommandTooltip?: string;
271
+ blockCommandTooltip?: string;
272
+ fontFamilyCommandTooltip?: string;
273
+ fontSizeCommandTooltip?: string;
274
+ styleCommandTooltip?: string;
275
+ alignCommandTooltip?: string;
276
+ lineHeightCommandTooltip?: string;
277
+ indentMinCommandTooltip?: string;
278
+ indentPlusCommandTooltip?: string;
279
+ orderedListCommandTooltip?: string;
280
+ unorderedListCommandTooltip?: string;
281
+ checkListCommandTooltip?: string;
282
+ linkCommandTooltip?: string;
283
+ imageCommandTooltip?: string;
284
+ mediaCommandTooltip?: string;
285
+ tableCommandTooltip?: string;
286
+ subscriptCommandTooltip?: string;
287
+ superscriptCommandTooltip?: string;
288
+ copyFormatCommandTooltip?: string;
289
+ clearFormatCommandTooltip?: string;
290
+ bookmarkCommandTooltip?: string;
291
+ horizontalLineCommandTooltip?: string;
292
+ pageBreakCommandTooltip?: string;
293
+ sourceCommandTooltip?: string;
294
+ expandCommandTooltip?: string;
295
+ previewCommandTooltip?: string;
296
+ saveCommandTooltip?: string;
297
+ exportCommandTooltip?: string;
298
+ printCommandTooltip?: string;
299
+ moreCommandTooltip?: string;
300
+ blockViewCommandTooltip?: string;
301
+ specialCommandTooltip?: string;
302
+ emojiCommandTooltip?: string;
303
+ };
304
+
305
+ /**
306
+ * <p>Editor CSS Variables.</p>
307
+ * @property ["--font-color"] - <p>The font color.</p>
308
+ * @property ["--font-bg-color"] - <p>The font background color.</p>
309
+ * @property ["--image-width"] - <p>The image width.</p>
310
+ * @property ["--image-height"] - <p>The image height.</p>
311
+ */
312
+ type CSSVariables = {
313
+ "--font-color"?: string;
314
+ "--font-bg-color"?: string;
315
+ "--image-width"?: string;
316
+ "--image-height"?: string;
317
+ };
318
+
319
+ /**
320
+ * @property match - <p>The matching RegExp.</p>
321
+ * @property replace - <p>The replacement text.</p>
322
+ */
323
+ type ReplacementItem = {
324
+ match: RegExp;
325
+ replace: string;
326
+ };
327
+
328
+ /**
329
+ * <p>Returns true if the command button is active (selected).</p>
330
+ * @param node - <p>The HTML Element node.</p>
331
+ * @param cmd - <p>The command settings.</p>
332
+ */
333
+ type IsActiveFunction = (node: HTMLElement, cmd?: CommandSettings) => boolean;
334
+
335
+ /**
336
+ * <p>Returns the layout node when it is deeper inside the root-node of the active selection range (e.g. FIGURE &gt; IMG).</p>
337
+ * @param node - <p>The HTML Element node.</p>
338
+ */
339
+ type GetNodeFunction = (node: HTMLElement) => HTMLElement | null;
340
+
341
+ /**
342
+ * @property node - <p>Gets or sets the node.</p>
343
+ * @property tag - <p>Gets or sets the tag of the element.</p>
344
+ * @property cssClass - <p>Gets or sets the CSS class of the element.</p>
345
+ * @property styles - <p>Gets or sets the CSS styles of the element.</p>
346
+ * @property attributes - <p>Gets or sets the attributes of the element.</p>
347
+ * @property textContent - <p>Gets or sets the text content of the element.</p>
348
+ * @property innerHTML - <p>Gets or sets the inner HTML of the element (overwrites textContent).</p>
349
+ * @property outerHTML - <p>Gets or sets the outer HTML of the element. When a value is provided the tag, cssClass, styles, attributes, textContent and innerHTML properties are ignored.</p>
350
+ * @property isPhrasingContent - <p>Gets or sets a value indicating if the element is phrasing content and can be placed inside a P tag.</p>
351
+ * @property selectable - <p>Gets or sets a value indicating if the element is selectable. For selectability on document reload, ensure the element matches a selector in selectableNodes.</p>
352
+ * @property select - <p>Gets or sets a value indicating if the element is selected when inserted.</p>
353
+ * @property allowContent - <p>Gets or sets a value indicating if the element allows editable content.</p>
354
+ */
355
+ type HTMLElementSettings = {
356
+ node?: Node;
357
+ tag?: string;
358
+ cssClass?: string;
359
+ styles?: { [key: string]: string };
360
+ attributes?: { [key: string]: string };
361
+ textContent?: string;
362
+ innerHTML?: string;
363
+ outerHTML?: string;
364
+ isPhrasingContent?: boolean;
365
+ selectable?: boolean;
366
+ select?: boolean;
367
+ allowContent?: boolean;
368
+ };
369
+
370
+ /**
371
+ * <p>Command settings.</p>
372
+ */
373
+ type CommandSettings = {
374
+ /** <p>Gets or sets the button command.</p> */
375
+ command?: ((cmd?: any) => any) | null;
376
+ /** <p>Gets or sets the key used to trigger the command when the CTRL key is held.</p> */
377
+ shortcutKey?: string;
378
+ /** <p>Gets or sets the tooltip text to display when the command is in focus.</p> */
379
+ tooltip?: string;
380
+ /** <p>Gets or sets the css class name of the button icon.</p> */
381
+ cssClassIcon?: string;
382
+ /** <p>Gets or sets the css class name of the button.</p> */
383
+ cssClass?: string;
384
+ /** <p>Gets or sets a value indicating if the command button is shown.</p> */
385
+ show?: boolean;
386
+ /** <p>Gets or sets the function which should return true if the command button is active (selected).</p> */
387
+ isActive?: IsActiveFunction;
388
+ /** <p>Gets or sets the function which should return the layout node when it is deeper inside the root-node of the active selection range (e.g. FIGURE &gt; IMG).</p> */
389
+ getNode?: GetNodeFunction;
390
+ /** <p>Gets or sets the id of the base item button.</p> */
391
+ buttonId?: string | null;
392
+ /** <p>Gets or sets a value indicating the button type. 0: command-button, 1: check-button, 2: radio-button.</p> */
393
+ type?: 0 | 1 | 2;
394
+ /** <p>Gets or sets the id of the menu component.</p> */
395
+ menuId?: string | null;
396
+ /** <p>Gets or sets the menu-item id.</p> */
397
+ menuItemId?: string;
398
+ /** <p>Gets or sets the index number of the group to which the command belongs.</p> */
399
+ group?: number;
400
+ /** <p>Gets or sets the position of the command within the group. If no positions are specified commands are ordered by insertion order.</p> */
401
+ position?: number;
402
+ /** <p>Gets or sets the settings which configure the element to insert into the document.</p> */
403
+ elementSettings?: HTMLElementSettings;
404
+ /** <p>Gets or sets the command id (used by built-in commands).</p> */
405
+ id?: string;
406
+ /** <p>Gets or sets a value indicating if the command node is selectable (used by built-in commands).</p> */
407
+ selectable?: boolean;
408
+ /** <p>Gets or sets the id of the box shown by the command button (used by built-in commands).</p> */
409
+ boxId?: string;
410
+ /** <p>Gets or sets the CSS variable set by the command button (used by built-in commands).</p> */
411
+ cssVariable?: string;
412
+ /** <p>Gets or sets the content alignment of the command button (used by built-in commands).</p> */
413
+ contentAlign?: number;
414
+ /** <p>Gets or sets the expand direction of the command box (used by built-in commands).</p> */
415
+ expandDirection?: string;
416
+ /** <p>Gets or sets a CSS selector that makes elements created by this command selectable. The selector is added to selectableNodes when the toolbar is created.</p> */
417
+ selector?: string;
418
+ };
419
+
420
+ /**
421
+ * @property name - <p>Gets or sets the category name.</p>
422
+ * @property values - <p>Gets or sets the symbols of the category.</p>
423
+ */
424
+ type SymbolCategory = {
425
+ name: string;
426
+ values: componyx.UI.Editor.Symbol[];
427
+ };
428
+
429
+ /**
430
+ * @property name - <p>Gets or sets the symbol name.</p>
431
+ * @property value - <p>Gets or sets the symbol value.</p>
432
+ */
433
+ type Symbol = {
434
+ name: string;
435
+ value: string;
436
+ };
437
+
438
+ /**
439
+ * <p>PDF export settings for jsPDF. View https://github.com/parallax/jsPDF</p>
440
+ */
441
+ type PDFExportSettings = {
442
+ filename?: string;
443
+ margin?: number | number[];
444
+ autoPaging?: boolean | string;
445
+ html2canvas?: { [key: string]: any };
446
+ x?: number;
447
+ y?: number;
448
+ /** <p>Width in mm on the page.</p> */
449
+ width?: number;
450
+ /** <p>Width in CSS px the content is laid out in.</p> */
451
+ windowWidth?: number;
452
+ [key: string]: any;
453
+ };
454
+
455
+ /**
456
+ * <p>Identifiers for controls in the link dialog.</p>
457
+ */
458
+ type LinkDialogIds = {
459
+ /** <p>Gets or sets the id of the base link-href form-field.</p> */
460
+ hrefFormFieldId: string | null;
461
+ /** <p>Gets or sets the id of the base link-text form-field.</p> */
462
+ textFormFieldId: string | null;
463
+ /** <p>Gets or sets the id of the base link-title form-field.</p> */
464
+ titleFormFieldId: string | null;
465
+ /** <p>Gets or sets the id of the base link-target form-field.</p> */
466
+ targetFormFieldId: string | null;
467
+ /** <p>Gets or sets the id of the base link-downloadable form-field.</p> */
468
+ downloadableFormFieldId: string | null;
469
+ /** <p>Gets or sets the id of the base link-href combo-box.</p> */
470
+ hrefComboBoxId: string | null;
471
+ /** <p>Gets or sets the id of the base link-target combo-box.</p> */
472
+ targetComboBoxId: string | null;
473
+ /** <p>Gets or sets the id of the base remove-link button.</p> */
474
+ removeButtonId: string | null;
475
+ };
476
+
477
+ /**
478
+ * <p>Identifiers for controls in the image dialog.</p>
479
+ */
480
+ type ImageDialogIds = {
481
+ /** <p>Gets or sets the id of the base image-source form-field.</p> */
482
+ sourceFormFieldId: string | null;
483
+ /** <p>Gets or sets the id of the base image-alt form-field.</p> */
484
+ altFormFieldId: string | null;
485
+ /** <p>Gets or sets the id of the base image-width form-field.</p> */
486
+ widthFormFieldId: string | null;
487
+ /** <p>Gets or sets the id of the base image-height form-field.</p> */
488
+ heightFormFieldId: string | null;
489
+ /** <p>Gets or sets the id of the base caption form-field.</p> */
490
+ captionFormFieldId: string | null;
491
+ /** <p>Gets or sets the id of the base alignment form-field.</p> */
492
+ alignmentFormFieldId: string | null;
493
+ /** <p>Gets or sets the id of the base image file button.</p> */
494
+ fileButtonId: string | null;
495
+ /** <p>Gets or sets the id of the base image constrain button.</p> */
496
+ constrainButtonId: string | null;
497
+ };
498
+
499
+ /**
500
+ * <p>Identifiers for controls in the media dialog.</p>
501
+ */
502
+ type MediaDialogIds = {
503
+ /** <p>Gets or sets the id of the base media-source form-field.</p> */
504
+ sourceFormFieldId: string | null;
505
+ /** <p>Gets or sets the id of the base media-embed form-field.</p> */
506
+ embedFormFieldId: string | null;
507
+ /** <p>Gets or sets the id of the base media-width form-field.</p> */
508
+ widthFormFieldId: string | null;
509
+ /** <p>Gets or sets the id of the base media-caption form-field.</p> */
510
+ captionFormFieldId: string | null;
511
+ };
512
+
513
+ /**
514
+ * <p>Identifiers for controls in the table dialog.</p>
515
+ */
516
+ type TableDialogIds = {
517
+ /** <p>Gets or sets the id of the base table-width form-field.</p> */
518
+ tableWidthFormFieldId: string | null;
519
+ /** <p>Gets or sets the id of the base table-align form-field.</p> */
520
+ tableAlignFormFieldId: string | null;
521
+ /** <p>Gets or sets the id of the base table-border-width form-field.</p> */
522
+ tableBorderWidthFormFieldId: string | null;
523
+ /** <p>Gets or sets the id of the base table-border-style form-field.</p> */
524
+ tableBorderStyleFormFieldId: string | null;
525
+ /** <p>Gets or sets the id of the base table-cell-spacing form-field.</p> */
526
+ tableCellSpacingFormFieldId: string | null;
527
+ /** <p>Gets or sets the id of the base table-cell-padding form-field.</p> */
528
+ tableCellPaddingFormFieldId: string | null;
529
+ /** <p>Gets or sets the id of the base table-caption form-field.</p> */
530
+ tableCaptionFormFieldId: string | null;
531
+ /** <p>Gets or sets the id of the base table-background-color form-field.</p> */
532
+ tableBgColorFormFieldId: string | null;
533
+ /** <p>Gets or sets the id of the base table-border-color form-field.</p> */
534
+ tableBorderColorFormFieldId: string | null;
535
+ /** <p>Gets or sets the id of the base row-is-header form-field.</p> */
536
+ rowIsHeaderFormFieldId: string | null;
537
+ /** <p>Gets or sets the id of the base row-is-footer form-field.</p> */
538
+ rowIsFooterFormFieldId: string | null;
539
+ /** <p>Gets or sets the id of the base row-height form-field.</p> */
540
+ rowHeightFormFieldId: string | null;
541
+ /** <p>Gets or sets the id of the base row-background-color form-field.</p> */
542
+ rowBgColorFormFieldId: string | null;
543
+ /** <p>Gets or sets the id of the base row-border-style form-field.</p> */
544
+ rowBorderStyleFormFieldId: string | null;
545
+ /** <p>Gets or sets the id of the base row-border-color form-field.</p> */
546
+ rowBorderColorFormFieldId: string | null;
547
+ /** <p>Gets or sets the id of the base cell-width form-field.</p> */
548
+ cellWidthFormFieldId: string | null;
549
+ /** <p>Gets or sets the id of the base cell-height form-field.</p> */
550
+ cellHeightFormFieldId: string | null;
551
+ /** <p>Gets or sets the id of the base cell-vertical-align form-field.</p> */
552
+ cellVerticalAlignFormFieldId: string | null;
553
+ /** <p>Gets or sets the id of the base cell-horizontal-align form-field.</p> */
554
+ cellHorizontalAlignFormFieldId: string | null;
555
+ /** <p>Gets or sets the id of the base cell-border-width form-field.</p> */
556
+ cellBorderWidthFormFieldId: string | null;
557
+ /** <p>Gets or sets the id of the base cell-border-style form-field.</p> */
558
+ cellBorderStyleFormFieldId: string | null;
559
+ /** <p>Gets or sets the id of the base cell-padding form-field.</p> */
560
+ cellPaddingFormFieldId: string | null;
561
+ /** <p>Gets or sets the id of the base cell-background-color form-field.</p> */
562
+ cellBgColorFormFieldId: string | null;
563
+ /** <p>Gets or sets the id of the base cell-border-color form-field.</p> */
564
+ cellBorderColorFormFieldId: string | null;
565
+ /** <p>Gets or sets the id of the base cell-horizontal-align combo-box.</p> */
566
+ horizontalAlignComboBoxId: string | null;
567
+ /** <p>Gets or sets the id of the base cell-vertical-align combo-box.</p> */
568
+ verticalAlignComboBoxId: string | null;
569
+ /** <p>Gets or sets the id of the base border-style combo-box, shared across table, row and cell panels.</p> */
570
+ borderStyleComboBoxId: string | null;
571
+ /** <p>Gets or sets the id of the base border-color button, shared across table, row and cell panels.</p> */
572
+ borderColorButtonId: string | null;
573
+ /** <p>Gets or sets the id of the base background-color button, shared across table, row and cell panels.</p> */
574
+ bgColorButtonId: string | null;
575
+ };
576
+
577
+ /**
578
+ * <p>The layout state of the current selection (see editor.layoutState.activeLayout).</p>
579
+ * <p>Besides the listed properties, every command with an isActive function gets a key equal to its command id,
580
+ * holding the matching node (or the node returned by its getNode function) when active, otherwise null.
581
+ * This includes custom commands.</p>
582
+ */
583
+ type ActiveLayout = {
584
+ /** <p>The node name of the root block (e.g. 'P', 'H1').</p> */
585
+ readonly block: string;
586
+ /** <p>The text-align value of the root block.</p> */
587
+ readonly align: string;
588
+ /** <p>The line-height value of the root block.</p> */
589
+ readonly lineHeight?: string;
590
+ /** <p>The font size (CSS value).</p> */
591
+ readonly fontSize: string;
592
+ /** <p>The font family.</p> */
593
+ readonly fontFamily: string;
594
+ /** <p>The active style menu item (empty object when no style is active).</p> */
595
+ readonly styleItem: { readonly id?: string; readonly text?: string; readonly [key: string]: any };
596
+ /** <p>The active link element, or null.</p> */
597
+ readonly link?: HTMLAnchorElement | null;
598
+ /** <p>The active image element, or null.</p> */
599
+ readonly image?: HTMLImageElement | null;
600
+ /** <p>The active media (FIGURE) element, or null.</p> */
601
+ readonly media?: HTMLElement | null;
602
+ /** <p>The active bookmark element, or null.</p> */
603
+ readonly bookmark?: HTMLAnchorElement | null;
604
+ /** <p>Active node per command id (e.g. strong, em, u, s, sub, sup, or a custom command id).</p> */
605
+ readonly [commandId: string]: any;
606
+ };
607
+
608
+ /**
609
+ * <p>Internal CSS class name constants. Override a class via the matching cssClass&lt;Key&gt; property on the instance.</p>
610
+ */
611
+ type ClassOption = Readonly<{
612
+ TOOLBAR: 'toolbar';
613
+ TOOLBAR_BOX: 'toolbar-box';
614
+ TOOLBAR_MORE: 'toolbar-more';
615
+ GROUP: 'group';
616
+ CONTENT: 'editor-content';
617
+ FOOTER: 'footer';
618
+ PATH: 'path';
619
+ WORD_COUNT: 'word-count';
620
+ FULLSCREEN: 'fullscreen';
621
+ PREVIEW: 'preview';
622
+ SOURCE_VIEW: 'source-view';
623
+ BOOKMARK: 'bookmark';
624
+ FIGURE: 'figure';
625
+ MEDIA: 'media';
626
+ LINK_DIALOG: 'link-dialog';
627
+ BOOKMARK_DIALOG: 'bookmark-dialog';
628
+ IMAGE_DIALOG: 'image-dialog';
629
+ MEDIA_DIALOG: 'media-dialog';
630
+ SOURCE_DIALOG: 'source-dialog';
631
+ FOCUS: 'focus';
632
+ FRAMED: 'framed';
633
+ HIDDEN: 'hidden';
634
+ TOOLTIP_MENU_LINK: 'tooltip-menu-link';
635
+ DOC_TOOLTIPS: 'doc-tooltips';
636
+ IMG_INLINE_ALIGN_DEFAULT_TOP: 'img-inline-align-default-top';
637
+ IMG_INLINE_ALIGN_DEFAULT_CENTER: 'img-inline-align-default-center';
638
+ IMG_INLINE_ALIGN_DEFAULT_BOTTOM: 'img-inline-align-default-bottom';
639
+ IMG_INLINE_ALIGN_LEFT: 'img-inline-align-left';
640
+ IMG_INLINE_ALIGN_RIGHT: 'img-inline-align-right';
641
+ IMG_ALIGN_LEFT: 'img-align-left';
642
+ IMG_ALIGN_CENTER: 'img-align-center';
643
+ IMG_ALIGN_RIGHT: 'img-align-right';
644
+ COLORSWATCH_BOX: 'box color-swatch';
645
+ SWATCH: 'swatch';
646
+ SWATCH_COLOR: 'swatch-color';
647
+ CLEARCOLOR_BUTTON: 'clear-color-button';
648
+ COLORPICKER_BUTTON: 'color-picker-button';
649
+ SYMBOL_PICKER_BOX: 'box symbol-picker';
650
+ EMOJI_SYMBOL_PICKER: 'emoji-picker';
651
+ SPECIAL_SYMBOL_PICKER: 'special-picker';
652
+ SYMBOL_CATEGORIES: 'symbol-categories';
653
+ SYMBOL_VIEW: 'symbol-view';
654
+ SYMBOL_CATEGORY: 'symbol-category';
655
+ SYMBOL_ITEMS: 'symbol-items';
656
+ SYMBOL_HEADER: 'symbol-header';
657
+ SYMBOL_FOOTER: 'symbol-footer';
658
+ SYMBOL: 'symbol';
659
+ TABLE_PICKER: 'te-picker';
660
+ TABLE_PICKER_GRID: 'te-picker-grid';
661
+ TABLE_PICKER_LABEL: 'te-picker-label';
662
+ TABLE_WRAPPER: 'te-wrapper';
663
+ TABLE_ANCHOR: 'te-anchor';
664
+ TABLE_SELECTED: 'te-selected';
665
+ TABLE_COL_HANDLE: 'te-col-handle';
666
+ TABLE_COL_HANDLE_ACTIVE: 'te-col-handle-active';
667
+ TABLE_MENU_BUTTON: 'te-menu-button';
668
+ TABLE_DIALOG: 'table-dialog';
669
+ TABLE_DIALOG_CATEGORIES: 'table-dialog-categories';
670
+ TABLE_DIALOG_VIEW: 'table-dialog-view';
671
+ TABLE_DIALOG_PANEL: 'table-dialog-panel';
672
+ TABLE_DIALOG_CATEGORY: 'table-dialog-category';
673
+ ACTIVE: 'active';
674
+ REMOVE: 'remove';
675
+ LOCK: 'lock';
676
+ FILE_SELECT: 'file-select';
677
+ FIELD_HALF: 'field-half';
678
+ PARAGRAPH: 'paragraph';
679
+ PDF_EXPORT: 'editor-pdf-export';
680
+ }>;
681
+
682
+ /* --- Event args and handlers --- */
683
+
684
+ /**
685
+ * @property imageElement - <p>The image element involved.</p>
686
+ * @property [file] - <p>The image file if available, otherwise null.</p>
687
+ */
688
+ type ImageEventArgs = {
689
+ imageElement: HTMLImageElement;
690
+ file?: File | null;
691
+ };
692
+
693
+ /**
694
+ * @property event - <p>The native paste event.</p>
695
+ */
696
+ type PasteEventArgs = {
697
+ event: ClipboardEvent;
698
+ };
699
+
700
+ /**
701
+ * @property html - <p>The document HTML content.</p>
702
+ */
703
+ type SaveEventArgs = {
704
+ html: string;
705
+ };
706
+
707
+ /**
708
+ * @property href - <p>The URL or path of the link.</p>
709
+ * @property text - <p>The link text.</p>
710
+ * @property title - <p>The link title.</p>
711
+ * @property target - <p>The link target.</p>
712
+ */
713
+ type ActiveLinkItem = {
714
+ href: string;
715
+ text: string;
716
+ title: string;
717
+ target: string;
718
+ };
719
+
720
+ /**
721
+ * @param url - <p>The URL or path of the selected link.</p>
722
+ * @param [linkText] - <p>The link text.</p>
723
+ * @param [linkTitle] - <p>The link title.</p>
724
+ */
725
+ type ConfirmLinkSelectionCallback = (url: string, linkText?: string, linkTitle?: string) => void;
726
+
727
+ /**
728
+ * @property container - <p>The dialog content container element.</p>
729
+ * @property activeItem - <p>The currently active link in the editor, or null if no link is selected.</p>
730
+ * @property confirmSelection - <p>A function to confirm the selected link and insert it into the document.</p>
731
+ */
732
+ type LinkDialogShowEventArgs = {
733
+ container: HTMLElement;
734
+ activeItem: ActiveLinkItem | null;
735
+ confirmSelection: ConfirmLinkSelectionCallback;
736
+ };
737
+
738
+ /**
739
+ * @property src - <p>The URL or path of the image.</p>
740
+ * @property alt - <p>The alternative text.</p>
741
+ * @property width - <p>The image width.</p>
742
+ * @property height - <p>The image height.</p>
743
+ * @property caption - <p>The caption text.</p>
744
+ */
745
+ type ActiveImageItem = {
746
+ src: string;
747
+ alt: string;
748
+ width: number;
749
+ height: number;
750
+ caption: string;
751
+ };
752
+
753
+ /**
754
+ * @param url - <p>The URL or path of the selected image.</p>
755
+ * @param [alt] - <p>The alternative text.</p>
756
+ * @param [caption] - <p>The caption text.</p>
757
+ */
758
+ type ConfirmImageSelectionCallback = (url: string, alt?: string, caption?: string) => void;
759
+
760
+ /**
761
+ * @property container - <p>The dialog content container element.</p>
762
+ * @property activeItem - <p>The currently active image in the editor, or null if no image is selected.</p>
763
+ * @property confirmSelection - <p>A function to confirm the selected image and insert it into the document.</p>
764
+ */
765
+ type ImageDialogShowEventArgs = {
766
+ container: HTMLElement;
767
+ activeItem: ActiveImageItem | null;
768
+ confirmSelection: ConfirmImageSelectionCallback;
769
+ };
770
+
771
+ /**
772
+ * @property src - <p>The URL or path of the media, or null if embedded.</p>
773
+ * @property embed - <p>The embed HTML, or null if a URL is used.</p>
774
+ * @property width - <p>The media width.</p>
775
+ * @property caption - <p>The caption text.</p>
776
+ */
777
+ type ActiveMediaItem = {
778
+ src: string | null;
779
+ embed: string | null;
780
+ width: string;
781
+ caption: string;
782
+ };
783
+
784
+ /**
785
+ * @param url - <p>The URL or path of the selected media.</p>
786
+ */
787
+ type ConfirmMediaSelectionCallback = (url: string) => void;
788
+
789
+ /**
790
+ * @property container - <p>The dialog content container element.</p>
791
+ * @property activeItem - <p>The currently active media in the editor, or null if no media is selected.</p>
792
+ * @property confirmSelection - <p>A function to confirm the selected media and insert it into the document.</p>
793
+ */
794
+ type MediaDialogShowEventArgs = {
795
+ container: HTMLElement;
796
+ activeItem: ActiveMediaItem | null;
797
+ confirmSelection: ConfirmMediaSelectionCallback;
798
+ };
799
+
800
+ /**
801
+ * @property sanitizer - <p>The created sanitizer class instance.</p>
802
+ */
803
+ type CreateSanitizerEventArgs = {
804
+ sanitizer: componyx.base_modules.Sanitizer;
805
+ };
806
+
807
+ /**
808
+ * <p>Editor events.</p>
809
+ */
810
+ class EditorEvents extends componyx.UI.base.Events<componyx.UI.Editor>
811
+ {
812
+ constructor(events?: componyx.UI.base.Events);
813
+ /** <p>Fires when all included iframe stylesheets are loaded.</p> */
814
+ onStylesheetsLoaded: componyx.UI.base.Event<componyx.UI.Editor, undefined>;
815
+ /** <p>Fires when an image is dragged and dropped into the editor.</p> */
816
+ onImageDrop: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.ImageEventArgs>;
817
+ /** <p>Fires when an image is selected or URL provided.</p> */
818
+ onImageSelect: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.ImageEventArgs>;
819
+ /** <p>Fires when an image is fully loaded.</p> */
820
+ onImageLoad: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.ImageEventArgs>;
821
+ /** <p>Fires on paste.</p> */
822
+ onPaste: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.PasteEventArgs>;
823
+ /** <p>Fires on undo.</p> */
824
+ onUndo: componyx.UI.base.Event<componyx.UI.Editor, undefined>;
825
+ /** <p>Fires on redo.</p> */
826
+ onRedo: componyx.UI.base.Event<componyx.UI.Editor, undefined>;
827
+ /** <p>Fires on text selection change.</p> */
828
+ onSelectionChange: componyx.UI.base.Event<componyx.UI.Editor, undefined>;
829
+ /** <p>Fires on save.</p> */
830
+ onSave: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.SaveEventArgs>;
831
+ /** <p>Fires when the link dialog content is rendered.</p> */
832
+ onLinkDialogShow: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.LinkDialogShowEventArgs>;
833
+ /** <p>Fires when the image dialog content is rendered.</p> */
834
+ onImageDialogShow: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.ImageDialogShowEventArgs>;
835
+ /** <p>Fires when the media dialog content is rendered.</p> */
836
+ onMediaDialogShow: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.MediaDialogShowEventArgs>;
837
+ /** <p>Fires when the default HTML sanitizer is created, allowing optional configuration.</p> */
838
+ onCreateSanitizer: componyx.UI.base.Event<componyx.UI.Editor, componyx.UI.Editor.CreateSanitizerEventArgs>;
839
+ }
840
+
841
+ /**
842
+ * <p>Creates an instance of the Style item.</p>
843
+ */
844
+ class StyleItem
845
+ {
846
+ /**
847
+ * @param properties - <p>The properties used to initialize the object.</p>
848
+ */
849
+ constructor(properties?: Partial<StyleItem>);
850
+ /** <p>Gets or sets the identifier of the item (id is generated by default).</p> */
851
+ id?: string;
852
+ /** <p>Gets or sets the display text of the item.</p> */
853
+ text: string;
854
+ /** <p>Gets or sets the css class of the preview element.</p> */
855
+ previewCssClass: string;
856
+ /** <p>Gets or sets a value indicating that the item is a category. Child-items of a category are rendered as root-level navigation and are displayed when the category-item is selected (hiding the current root menu/category).</p> */
857
+ isCategory?: boolean;
858
+ /** <p>Gets or sets the id of the menu item template.</p> */
859
+ templateId: string;
860
+ /** <p>Gets or sets the settings which configure the element to insert into the document.</p> */
861
+ elementSettings: HTMLElementSettings;
862
+ /** <p>Gets or sets the child-item list of the item.</p> */
863
+ itemList: componyx.UI.Editor.StyleItem[];
864
+ }
865
+
866
+ /**
867
+ * <p>ToolbarDisplayOption</p>
868
+ */
869
+ const ToolbarDisplayOption: {
870
+ readonly HEADER: 0;
871
+ readonly FOOTER: 1;
872
+ readonly CARET: 2;
873
+ /** <p>Gets the lowercase name of the option value.</p> */
874
+ getName(value: ToolbarDisplayOption): string;
875
+ };
876
+ type ToolbarDisplayOption = 0 | 1 | 2;
877
+ }
878
+
879
+ interface Editor extends componyx.UI.base.methods { }
880
+
881
+ /**
882
+ * <p>Editor class.</p>
883
+ * <p>Note: if you use $lib alongside the editor API in an iframe configuration, be aware that editor operations temporarily switch $lib.document to the iframe document.
884
+ * This resets automatically via microtask after each callstack. Call editor.deactivateDocument() explicitly (or reset $lib.document) if you need to restore the context immediately within the same callstack.</p>
885
+ */
886
+ class Editor extends componyx.UI.base.Component implements componyx.UI.base.methods
887
+ {
888
+ /**
889
+ * Creates a new Editor instance.
890
+ * @param id - <p>The id of the component.</p>
891
+ * @param properties - <p>The properties used to initialize the component or the container element.</p>
892
+ */
893
+ constructor(id: string, properties?: Partial<Editor> | HTMLElement);
894
+
895
+ /**
896
+ * <p>Internal CSS class name constants.
897
+ * You can override any of these classes on the instance by defining a property named cssClass&lt;Key&gt;
898
+ * where &lt;Key&gt; is the PascalCase key (e.g. 'TOOLBAR_BOX' -&gt; 'cssClassToolbarBox').
899
+ * Overriding these classes without including the default names may break styling and functionality.</p>
900
+ */
901
+ readonly classOption: componyx.UI.Editor.ClassOption;
902
+
903
+ /* --- Properties --- */
904
+
905
+ /** <p>Gets or sets the editor height.</p> */
906
+ editorHeight: string;
907
+ /** <p>Gets or sets the default font size.</p> */
908
+ defaultFontSize: string;
909
+ /** <p>Gets or sets the default font family.</p> */
910
+ defaultFontFamily: string;
911
+ /** <p>Gets or sets the default alignment.</p> */
912
+ defaultAlign: string;
913
+ /** <p>Gets or sets the default line-height.</p> */
914
+ defaultLineHeight: string;
915
+ /** <p>Gets or sets the content.</p> */
916
+ content: string;
917
+ /** <p>Gets or sets the toolbar display option.</p> */
918
+ toolbarDisplay: componyx.UI.Editor.ToolbarDisplayOption;
919
+ /** <p>Gets or sets a value indicating the editor uses an iframe (instead of content-editable DIV) to isolate the content-editable document from the default document.</p> */
920
+ iframe: boolean;
921
+ /** <p>Gets or sets a value indicating if CSS imported fonts should be detected and included in the fontFamily menu.</p> */
922
+ detectFonts: boolean;
923
+ /** <p>Gets or sets a value indicating if default WebSafe fonts are included in the fontFamily menu.</p> */
924
+ includeWebSafeFonts: boolean;
925
+ /** <p>Gets or sets a value indicating if missing font-sizes are added to the font-size menu.</p> */
926
+ addMissingFontSize: boolean;
927
+ /** <p>Gets or sets a value indicating if the default Browser spellcheck is enabled on the content-editable element.</p> */
928
+ defaultSpellcheck: boolean;
929
+ /** <p>Gets or sets a value indicating if the source view is displayed in a dialog instead of in the editor view.</p> */
930
+ sourceViewInDialog: boolean;
931
+ /** <p>Gets or sets a value indicating if a local image file can be selected.</p> */
932
+ allowImageFileSelect: boolean;
933
+ /** <p>Gets or sets a value indicating if an url can be entered for images.</p> */
934
+ allowImageUrlInput: boolean;
935
+ /** <p>Gets or sets the default indent CSS unit value.</p> */
936
+ indentValue: string;
937
+ /** <p>Gets or sets the maximum items allowed in the history stack. Null means no limit.</p> */
938
+ maxHistoryLength: number | null;
939
+ /** <p>Gets or sets the prefix used to store data in local storage like color swatch colors.</p> */
940
+ localStoragePrefix: string;
941
+ /** <p>Gets or sets the resource path for fetching the emojis.</p> */
942
+ emojiSymbolResourcePath: string;
943
+ /** <p>Gets or sets the resource path for fetching the special characters.</p> */
944
+ specialSymbolResourcePath: string;
945
+ /** <p>Gets or sets the emoji symbol data. The data can either be set directly or can be fetched by specifying the emoji symbol resource path.</p> */
946
+ emojiSymbolData: componyx.UI.Editor.SymbolCategory[] | null;
947
+ /** <p>Gets or sets the special symbol data. The data can either be set directly or can be fetched by specifying the special symbol resource path.</p> */
948
+ specialSymbolData: componyx.UI.Editor.SymbolCategory[] | null;
949
+ /** <p>Gets or sets a list of editable elements (add via addEditableElement). No default content-editable element will be rendered when editable elements are provided.</p> */
950
+ editableElements: componyx.UI.Editor.EditableElement[];
951
+ /** <p>Gets or sets a list of custom fonts to include in the fontFamily menu.</p> */
952
+ fonts: string[];
953
+ /** <p>Gets or sets a list of fonts to specifically exclude from the fontFamily menu.</p> */
954
+ excludeFonts: string[];
955
+ /** <p>Gets or sets a list of CSS unit font sizes to show in the fontSize menu.</p> */
956
+ fontSizes: string[];
957
+ /** <p>Gets or sets a list of style items to show in the style menu.</p> */
958
+ styles: componyx.UI.Editor.StyleItem[];
959
+ /** <p>Gets or sets a list of line height options.</p> */
960
+ lineHeights: string[];
961
+ /** <p>Gets or sets a list of ordered list-item options.</p> */
962
+ orderedList: string[];
963
+ /** <p>Gets or sets a list of unordered list-item options.</p> */
964
+ unorderedList: string[];
965
+ /** <p>Gets or sets a list of colors displayed in the color-swatch.</p> */
966
+ colorSwatchColors: string[];
967
+ /**
968
+ * <p>Gets or sets a list of unique command names (or special keywords) to show on initialization. By default all supported commands are visible. If set, only these listed commands are visible.</p>
969
+ * <ul>
970
+ * <li>'*core' : ['undo','redo','bold','italic','underline','strikeThrough','align','indentMin','indentPlus','copyFormat','clearFormat']</li>
971
+ * <li>'*list' : ['orderedList','unorderedList']</li>
972
+ * <li>'*font' : ['fontSize','fontFamily']</li>
973
+ * <li>'*font-color' : ['fontColor','fontBGColor']</li>
974
+ * </ul>
975
+ */
976
+ visibleCommands: string[];
977
+ /** <p>Gets or sets a list of extra commands to add on initialization. Each object key is the unique command name and the value holds the command settings.</p> */
978
+ extraCommands: { [key: string]: componyx.UI.Editor.CommandSettings };
979
+ /** <p>Gets or sets the text labels used by the editor.</p> */
980
+ labels: componyx.UI.Editor.LabelSettings;
981
+ /** <p>Gets or sets a list of stylesheets to include in the iframe. Setting only applicable when iframe is set to true.</p> */
982
+ includeStylesheets: string[];
983
+ /** <p>Gets or sets the PDF export settings for jsPDF. View https://github.com/parallax/jsPDF</p> */
984
+ PDFExportSettings: componyx.UI.Editor.PDFExportSettings;
985
+ /** <p>Gets or sets media URL replacement options.</p> */
986
+ mediaURLReplacement: componyx.UI.Editor.ReplacementItem[];
987
+ /** <p>Gets or sets CSS Selectors for nodes that are selectable in the editor. Defaults include anchors, figures and non-editable elements. Additional selectors can be added before render to support custom selectable elements.</p> */
988
+ selectableNodes: string[];
989
+ /** <p>Gets or sets a custom sanitizer function to sanitize HTML. When set, overrides the built-in sanitizer. Client-side sanitization is not a substitute for server-side validation.</p> */
990
+ sanitizer: ((html: string) => string) | null;
991
+
992
+ /* --- Base component ids --- */
993
+
994
+ /** <p>Gets or sets the id of the base menu.</p> */
995
+ menuId: string | null;
996
+ /** <p>Gets or sets the id of the base table menu.</p> */
997
+ tableMenuId: string | null;
998
+ /** <p>Gets or sets the id of the base toolbar box.</p> */
999
+ toolbarBoxId: string | null;
1000
+ /** <p>Gets or sets the id of the base toolbar-more box.</p> */
1001
+ toolbarMoreBoxId: string | null;
1002
+ /** <p>Gets or sets the id of the base color swatch box.</p> */
1003
+ colorSwatchBoxId: string | null;
1004
+ /** <p>Gets or sets the id of the base clear-color button.</p> */
1005
+ clearColorButtonId: string | null;
1006
+ /** <p>Gets or sets the id of the base color picker.</p> */
1007
+ colorPickerId: string | null;
1008
+ /** <p>Gets or sets the id of the base source-dialog.</p> */
1009
+ sourceDialogId: string | null;
1010
+ /** <p>Gets or sets the id of the base bookmark-dialog.</p> */
1011
+ bookmarkDialogId: string | null;
1012
+ /** <p>Gets or sets the id of the base link-dialog.</p> */
1013
+ linkDialogId: string | null;
1014
+ /** <p>Gets or sets the id of the base image-dialog.</p> */
1015
+ imageDialogId: string | null;
1016
+ /** <p>Gets or sets the id of the base media-dialog.</p> */
1017
+ mediaDialogId: string | null;
1018
+ /** <p>Gets or sets identifiers for controls in the link dialog.</p> */
1019
+ linkDialog: componyx.UI.Editor.LinkDialogIds;
1020
+ /** <p>Gets or sets identifiers for controls in the image dialog.</p> */
1021
+ imageDialog: componyx.UI.Editor.ImageDialogIds;
1022
+ /** <p>Gets or sets identifiers for controls in the media dialog.</p> */
1023
+ mediaDialog: componyx.UI.Editor.MediaDialogIds;
1024
+ /** <p>Gets or sets identifiers for controls in the table dialog.</p> */
1025
+ tableDialog: componyx.UI.Editor.TableDialogIds;
1026
+ /** <p>Gets or sets the id of the base validator.</p> */
1027
+ validatorId: string | null;
1028
+ /** <p>Gets or sets the id of the base emoji symbol picker box.</p> */
1029
+ emojiSymbolPickerBoxId: string | null;
1030
+ /** <p>Gets or sets the id of the base special symbol picker box.</p> */
1031
+ specialSymbolPickerBoxId: string | null;
1032
+ /** <p>Gets or sets the id of the base button tooltip manager.</p> */
1033
+ buttonTooltipManagerId: string | null;
1034
+ /** <p>Gets or sets the id of the base document tooltip manager.</p> */
1035
+ documentTooltipManagerId: string | null;
1036
+ /** <p>Gets or sets the id of the base table picker box.</p> */
1037
+ tablePickerBoxId: string | null;
1038
+
1039
+ /* --- Editor Module API --- */
1040
+
1041
+ /** <p>Provides utilities for working with the DOM selection and ranges within the editor document. Use this in custom commands to get and restore the selection range.</p> */
1042
+ selectionRange: componyx.UI.editor_modules.SelectionRange;
1043
+ /** <p>Provides utilities for querying DOM nodes within the editor document.</p> */
1044
+ nodeManager: componyx.UI.editor_modules.NodeManager;
1045
+ /** <p>Manages the undo/redo history stack. Call history.addItem() at the end of every custom command that mutates the document, otherwise undo will not work correctly.</p> */
1046
+ history: componyx.UI.editor_modules.History;
1047
+ /** <p>Tracks the current layout state of the editor, including the active selection context (link, image, table etc.). Call layoutState.getState() after mutations that affect the active layout to keep the toolbar in sync.</p> */
1048
+ layoutState: componyx.UI.editor_modules.LayoutState;
1049
+
1050
+ /** <p>Editor events.</p> */
1051
+ events: componyx.UI.Editor.EditorEvents;
1052
+ /** <p>Editor commands.</p> */
1053
+ commands: { [key: string]: componyx.UI.Editor.CommandSettings };
1054
+
1055
+ /* --- Methods --- */
1056
+
1057
+ /**
1058
+ * <p>Adds a content editable element.</p>
1059
+ * @param config - <p>The settings of the editable element.</p>
1060
+ */
1061
+ addEditableElement(config: componyx.UI.Editor.EditableElement): void;
1062
+ /** <p>Undoes an action.</p> */
1063
+ undo(): void;
1064
+ /** <p>Redoes an action.</p> */
1065
+ redo(): void;
1066
+ /** <p>Sets/unsets bold on the currently selected text range.</p> */
1067
+ bold(): void;
1068
+ /** <p>Sets/unsets italic on the currently selected text range.</p> */
1069
+ italic(): void;
1070
+ /** <p>Sets/unsets underline on the currently selected text range.</p> */
1071
+ underline(): void;
1072
+ /** <p>Sets/unsets strike-through on the currently selected text range.</p> */
1073
+ strikeThrough(): void;
1074
+ /** <p>Sets/unsets sub on the currently selected text range.</p> */
1075
+ sub(): void;
1076
+ /** <p>Sets/unsets super on the currently selected text range.</p> */
1077
+ sup(): void;
1078
+ /**
1079
+ * <p>Increases/decreases the indent on the current root block element.</p>
1080
+ * @param value - <p>A positive or negative CSS value.</p>
1081
+ */
1082
+ indent(value: string): void;
1083
+ /** <p>Clears the formatting on the currently selected text range.</p> */
1084
+ clearFormat(): void;
1085
+ /**
1086
+ * <p>Copies the formatting on the currently selected text range.</p>
1087
+ * @returns <p>A list of formatting nodes currently active on the selected text range.</p>
1088
+ */
1089
+ copyFormat(): Node[];
1090
+ /**
1091
+ * <p>Pastes the formatting on the currently selected text range.</p>
1092
+ * @param format - <p>A list of formatting nodes to apply to the selected text range.</p>
1093
+ */
1094
+ pasteFormat(format: Node[]): void;
1095
+ /**
1096
+ * <p>Converts the root block-level nodes in the currently selected text range to the specified block-level tag.</p>
1097
+ * @param tag - <p>The block-level element tag.</p>
1098
+ */
1099
+ setBlock(tag: string): void;
1100
+ /**
1101
+ * <p>Surrounds/unsurrounds the currently selected text range with the specified layout node.</p>
1102
+ * @param settings - <p>The layout-node settings (e.g. { tag: 'span', styles: { color: 'red' } }).</p>
1103
+ */
1104
+ toggleLayoutNode(settings: componyx.UI.Editor.HTMLElementSettings): void;
1105
+ /**
1106
+ * <p>Inserts HTML on the currently selected text range.</p>
1107
+ * @param settings - <p>The element settings.</p>
1108
+ */
1109
+ insert(settings: componyx.UI.Editor.HTMLElementSettings): void;
1110
+ /**
1111
+ * <p>Shows/hides the HTML source viewer.</p>
1112
+ * @param [on] - <p>Use value null to toggle, true to force on, false to force off.</p>
1113
+ */
1114
+ toggleSourceView(on?: boolean | null): void;
1115
+ /**
1116
+ * <p>Enables/disables the visibility of block level elements in the document.</p>
1117
+ * @param [on] - <p>Use value null to toggle, true to force on, false to force off.</p>
1118
+ */
1119
+ toggleBlockView(on?: boolean | null): void;
1120
+ /**
1121
+ * <p>Expands/collapses the editor view to fullscreen.</p>
1122
+ * @param [on] - <p>Use value null to toggle, true to force on, false to force off.</p>
1123
+ */
1124
+ toggleExpandedView(on?: boolean | null): void;
1125
+ /**
1126
+ * <p>Shows/hides the document in preview modus.</p>
1127
+ * @param [on] - <p>Use value null to toggle, true to force on, false to force off.</p>
1128
+ */
1129
+ togglePreview(on?: boolean | null): void;
1130
+ /** <p>Saves the document (fires onSave).</p> */
1131
+ save(): void;
1132
+ /** <p>Exports the document to PDF. Configure settings via PDFExportSettings.</p> */
1133
+ exportToPDF(): void;
1134
+ /** <p>Prints the document.</p> */
1135
+ print(): void;
1136
+ /**
1137
+ * <p>Gets a value indicating if the editor has editable elements.</p>
1138
+ */
1139
+ hasEditables(): boolean;
1140
+ /** <p>Shows the bookmark dialog.</p> */
1141
+ bookmark(): void;
1142
+ /** <p>Shows the insert link dialog to create a link for the selection range.</p> */
1143
+ insertLink(): void;
1144
+ /** <p>Removes the active link in the selection range.</p> */
1145
+ removeLink(): void;
1146
+ /** <p>Shows the insert image dialog.</p> */
1147
+ insertImage(): void;
1148
+ /** <p>Removes the active image in the selection range. If the image is wrapped in a FIGURE element, the figure is removed.</p> */
1149
+ removeImage(): void;
1150
+ /** <p>Shows the insert media dialog.</p> */
1151
+ insertMedia(): void;
1152
+ /** <p>Removes the active media in the selection range.</p> */
1153
+ removeMedia(): void;
1154
+ /**
1155
+ * <p>Sets the text-align value on the nodes in the selection range.</p>
1156
+ * @param value - <p>The text-align value (e.g. 'left', 'center', 'right', 'justify').</p>
1157
+ */
1158
+ align(value: string): void;
1159
+ /**
1160
+ * <p>Sets the line-height on the nodes in the selection range.</p>
1161
+ * @param value - <p>The line-height value.</p>
1162
+ */
1163
+ lineHeight(value: string | number): void;
1164
+ /** <p>Activates the current document.</p> */
1165
+ activateDocument(): void;
1166
+ /** <p>Deactivates the current document (resets $lib.document to window.document).</p> */
1167
+ deactivateDocument(): void;
1168
+
1169
+ /**
1170
+ * <p>Sets the link dialog content template. Available placeholders: {href}, {text}, {title}, {target}.</p>
1171
+ * @param content - <p>The HTML template.</p>
1172
+ */
1173
+ setLinkDialogContentTemplate(content: HTMLElement | HTMLElement[] | DocumentFragment | string): void;
1174
+ /**
1175
+ * <p>Sets the image dialog content template. Available placeholders: {source}, {alt}, {width}, {height}, {caption}, {alignment}, {inline} (renders in footer).</p>
1176
+ * @param content - <p>The HTML template.</p>
1177
+ */
1178
+ setImageDialogContentTemplate(content: HTMLElement | HTMLElement[] | DocumentFragment | string): void;
1179
+ /**
1180
+ * <p>Sets the media dialog content template. Available placeholders: {source}, {width}, {caption}.</p>
1181
+ * @param content - <p>The HTML template.</p>
1182
+ */
1183
+ setMediaDialogContentTemplate(content: HTMLElement | HTMLElement[] | DocumentFragment | string): void;
1184
+ /**
1185
+ * <p>Sets the table dialog Table panel content template. Available placeholders: {width}, {alignment}, {bgColor}, {borderWidth}, {borderStyle}, {borderColor}, {cellSpacing}, {caption}.</p>
1186
+ * @param content - <p>The HTML template.</p>
1187
+ */
1188
+ setTableDialogTableTemplate(content: HTMLElement | HTMLElement[] | DocumentFragment | string): void;
1189
+ /**
1190
+ * <p>Sets the table dialog Row panel content template. Available placeholders: {isHeader}, {isFooter}, {height}, {bgColor}, {borderStyle}, {borderColor}.</p>
1191
+ * @param content - <p>The HTML template.</p>
1192
+ */
1193
+ setTableDialogRowTemplate(content: HTMLElement | HTMLElement[] | DocumentFragment | string): void;
1194
+ /**
1195
+ * <p>Sets the table dialog Cell panel content template. Available placeholders: {width}, {height}, {verticalAlign}, {horizontalAlign}, {bgColor}, {borderWidth}, {borderStyle}, {borderColor}, {padding}.</p>
1196
+ * @param content - <p>The HTML template.</p>
1197
+ */
1198
+ setTableDialogCellTemplate(content: HTMLElement | HTMLElement[] | DocumentFragment | string): void;
1199
+ /**
1200
+ * <p>Sets the word count template. Available placeholders: {words} (word count), {chars} (character count).</p>
1201
+ * @param content - <p>The HTML template.</p>
1202
+ */
1203
+ setWordCountTemplate(content: HTMLElement | HTMLElement[] | DocumentFragment | string): void;
1204
+ /**
1205
+ * <p>Sets the tooltip menu template. Available placeholders: {href} (link href), {editButton} (edit link/image/media button), {removeButton} (remove link/image/media button).</p>
1206
+ * @param content - <p>The HTML template.</p>
1207
+ */
1208
+ setTooltipMenuTemplate(content: HTMLElement | HTMLElement[] | DocumentFragment | string): void;
1209
+
1210
+ /**
1211
+ * <p>Adds a toolbar command.</p>
1212
+ * @param name - <p>The unique command name.</p>
1213
+ * @param settings - <p>The command settings.</p>
1214
+ */
1215
+ addCommand(name: string, settings: componyx.UI.Editor.CommandSettings): void;
1216
+ /**
1217
+ * <p>Initializes the editor with ONLY the specified commands set to enabled (or disabled when the enable parameter is set to false).
1218
+ * For other commands, the opposite action is applied.
1219
+ * Special keywords can be used to refer to predefined groups of commands:</p>
1220
+ * <ul>
1221
+ * <li>'*core' : ['undo','redo','bold','italic','underline','strikeThrough','align','indentMin','indentPlus','copyFormat','clearFormat']</li>
1222
+ * <li>'*list' : ['orderedList','unorderedList']</li>
1223
+ * <li>'*font' : ['fontSize','fontFamily']</li>
1224
+ * <li>'*font-color' : ['fontColor','fontBGColor']</li>
1225
+ * </ul>
1226
+ * @param commands - <p>The unique command names or special keywords to enable/disable.</p>
1227
+ * @param [enable = true] - <p>If true, specified commands are enabled; if false, they are disabled.</p>
1228
+ */
1229
+ initCommands(commands: string[], enable?: boolean): void;
1230
+ /**
1231
+ * <p>Gets the active content-editable editor element (when iframe is set to true this will return the document.body element of the iframe).</p>
1232
+ * @returns <p>The active content-editable element.</p>
1233
+ */
1234
+ getEditorElement(): HTMLElement;
1235
+ /**
1236
+ * <p>Sets focus to the editable element.</p>
1237
+ * @param [caretAtEnd = true] - <p>A value indicating to set the caret at the end of the content.</p>
1238
+ */
1239
+ focus(caretAtEnd?: boolean): void;
1240
+ /**
1241
+ * <p>Cleans the HTML source.</p>
1242
+ * @param [clearZeroWidthCharacters = true] - <p>A value indicating if zero-width characters are removed.</p>
1243
+ */
1244
+ cleanSource(clearZeroWidthCharacters?: boolean): void;
1245
+ /**
1246
+ * <p>Gets the editor content (equal to getContent()).</p>
1247
+ * @param [editableElement] - <p>The specific editable element to get content from. Only applicable if this editor instance uses multiple editable elements.</p>
1248
+ * @returns <p>The editor HTML content.</p>
1249
+ */
1250
+ getValue(editableElement?: HTMLElement | null): string;
1251
+ /**
1252
+ * <p>Gets the editor content.</p>
1253
+ * @param [editableElement] - <p>The specific editable element to get content from. Only applicable if this editor instance uses multiple editable elements.</p>
1254
+ * @returns <p>The editor HTML content.</p>
1255
+ */
1256
+ getContent(editableElement?: HTMLElement | null): string;
1257
+ /**
1258
+ * <p>Sets the editor content (equal to setContent()).</p>
1259
+ * @param content - <p>The HTML content.</p>
1260
+ * @param [editableElement] - <p>The specific editable element to set content for. Only applicable if this editor instance uses multiple editable elements.</p>
1261
+ */
1262
+ setValue(content: string, editableElement?: HTMLElement | null): void;
1263
+ /**
1264
+ * <p>Sets the editor content.</p>
1265
+ * @param content - <p>The HTML content.</p>
1266
+ * @param [editableElement] - <p>The specific editable element to set content for. Only applicable if this editor instance uses multiple editable elements.</p>
1267
+ * @param [sanitize = true] - <p>A value indicating if the content should be sanitized.</p>
1268
+ */
1269
+ setContent(content: string, editableElement?: HTMLElement | null, sanitize?: boolean): void;
1270
+ /**
1271
+ * <p>Gets the active selection range.</p>
1272
+ * @returns <p>The active selection range.</p>
1273
+ */
1274
+ getRange(): Range;
1275
+ /**
1276
+ * <p>Sets the state of the toolbar buttons.</p>
1277
+ * @param enable - <p>A value that indicates if buttons are enabled or disabled.</p>
1278
+ * @param [exclude] - <p>A list of command id's to exclude.</p>
1279
+ */
1280
+ setToolbarButtonState(enable: boolean, exclude?: string[]): void;
1281
+ /** <p>Renders the component.</p> */
1282
+ render(): void;
1283
+ /** <p>Executes the post render procedure.</p> */
1284
+ postRender(): void;
1285
+ /** <p>Destroys the component.</p> */
1286
+ destroy(): void;
1287
+ }
1288
+ }
1289
+ }