@progress/kendo-angular-editor 13.1.0-develop.6 → 13.1.1-develop.1
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.
- package/common/apply-to-word-options.d.ts +1 -3
- package/common/commands.d.ts +16 -1
- package/common/css-settings.interface.d.ts +1 -3
- package/common/font-family-item.interface.d.ts +0 -8
- package/common/font-size-item.interface.d.ts +0 -8
- package/common/format-item.interface.d.ts +0 -8
- package/common/paste-cleanup-settings.d.ts +0 -11
- package/editor.component.d.ts +1 -63
- package/editor.module.d.ts +4 -25
- package/esm2020/editor.component.mjs +1 -63
- package/esm2020/editor.module.mjs +4 -25
- package/esm2020/localization/custom-messages.component.mjs +1 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/tools/alignment/editor-align-center-button.directive.mjs +2 -9
- package/esm2020/tools/alignment/editor-align-justify-button.directive.mjs +2 -9
- package/esm2020/tools/alignment/editor-align-left-button.directive.mjs +2 -9
- package/esm2020/tools/alignment/editor-align-right-button.directive.mjs +2 -9
- package/esm2020/tools/blockquote/editor-blockquote-button.directive.mjs +2 -9
- package/esm2020/tools/colorpicker/editor-back-color.directive.mjs +4 -0
- package/esm2020/tools/colorpicker/editor-colorpicker.component.mjs +3 -1
- package/esm2020/tools/colorpicker/editor-fore-color.directive.mjs +4 -0
- package/esm2020/tools/editor-clean-formatting-button.directive.mjs +2 -9
- package/esm2020/tools/fontfamily/editor-fontfamily.component.mjs +1 -1
- package/esm2020/tools/fontsize/editor-fontsize.component.mjs +1 -3
- package/esm2020/tools/format/editor-format.component.mjs +1 -1
- package/esm2020/tools/history/editor-redo-button.directive.mjs +2 -9
- package/esm2020/tools/history/editor-undo-button.directive.mjs +2 -9
- package/esm2020/tools/image/editor-insert-image-button.directive.mjs +2 -9
- package/esm2020/tools/indentation/editor-indent-button.directive.mjs +2 -9
- package/esm2020/tools/indentation/editor-outdent-button.directive.mjs +2 -9
- package/esm2020/tools/link/editor-create-link-button.directive.mjs +2 -9
- package/esm2020/tools/link/editor-insert-file-button.directive.mjs +3 -3
- package/esm2020/tools/link/editor-unlink-button.directive.mjs +2 -9
- package/esm2020/tools/list/editor-insert-ordered-list-button.directive.mjs +2 -9
- package/esm2020/tools/list/editor-insert-unordered-list-button.directive.mjs +2 -9
- package/esm2020/tools/print/editor-print-button.directive.mjs +2 -9
- package/esm2020/tools/select-all/select-all-button.directive.mjs +2 -9
- package/esm2020/tools/source/editor-view-source-button.directive.mjs +2 -9
- package/esm2020/tools/tables/editor-add-column-after-button.directive.mjs +3 -3
- package/esm2020/tools/tables/editor-add-column-before-button.directive.mjs +3 -3
- package/esm2020/tools/tables/editor-add-row-after-button.directive.mjs +3 -3
- package/esm2020/tools/tables/editor-add-row-before-button.directive.mjs +3 -3
- package/esm2020/tools/tables/editor-delete-column-button.directive.mjs +3 -3
- package/esm2020/tools/tables/editor-delete-row-button.directive.mjs +3 -3
- package/esm2020/tools/tables/editor-delete-table-button.directive.mjs +3 -3
- package/esm2020/tools/typographical-emphasis/editor-bold-button.directive.mjs +2 -9
- package/esm2020/tools/typographical-emphasis/editor-italic-button.directive.mjs +2 -9
- package/esm2020/tools/typographical-emphasis/editor-strikethrough-button.directive.mjs +2 -9
- package/esm2020/tools/typographical-emphasis/editor-subscript-button.directive.mjs +2 -9
- package/esm2020/tools/typographical-emphasis/editor-superscript-button.directive.mjs +2 -9
- package/esm2020/tools/typographical-emphasis/editor-underline-button.directive.mjs +2 -9
- package/esm2020/util.mjs +12 -1
- package/fesm2015/progress-kendo-angular-editor.mjs +106 -338
- package/fesm2020/progress-kendo-angular-editor.mjs +106 -338
- package/index.d.ts +0 -1
- package/localization/custom-messages.component.d.ts +1 -1
- package/package.json +14 -14
- package/schematics/ngAdd/index.js +3 -3
- package/tools/alignment/editor-align-center-button.directive.d.ts +2 -9
- package/tools/alignment/editor-align-justify-button.directive.d.ts +2 -9
- package/tools/alignment/editor-align-left-button.directive.d.ts +2 -9
- package/tools/alignment/editor-align-right-button.directive.d.ts +2 -9
- package/tools/blockquote/editor-blockquote-button.directive.d.ts +2 -9
- package/tools/colorpicker/editor-back-color.directive.d.ts +4 -0
- package/tools/colorpicker/editor-colorpicker.component.d.ts +3 -1
- package/tools/colorpicker/editor-fore-color.directive.d.ts +4 -0
- package/tools/editor-clean-formatting-button.directive.d.ts +2 -9
- package/tools/fontfamily/editor-fontfamily.component.d.ts +1 -1
- package/tools/fontsize/editor-fontsize.component.d.ts +1 -3
- package/tools/format/editor-format.component.d.ts +1 -1
- package/tools/history/editor-redo-button.directive.d.ts +2 -9
- package/tools/history/editor-undo-button.directive.d.ts +2 -9
- package/tools/image/editor-insert-image-button.directive.d.ts +2 -9
- package/tools/indentation/editor-indent-button.directive.d.ts +2 -9
- package/tools/indentation/editor-outdent-button.directive.d.ts +2 -9
- package/tools/link/editor-create-link-button.directive.d.ts +2 -9
- package/tools/link/editor-insert-file-button.directive.d.ts +3 -3
- package/tools/link/editor-unlink-button.directive.d.ts +2 -9
- package/tools/list/editor-insert-ordered-list-button.directive.d.ts +2 -9
- package/tools/list/editor-insert-unordered-list-button.directive.d.ts +2 -9
- package/tools/print/editor-print-button.directive.d.ts +2 -9
- package/tools/select-all/select-all-button.directive.d.ts +2 -9
- package/tools/source/editor-view-source-button.directive.d.ts +2 -9
- package/tools/tables/editor-add-column-after-button.directive.d.ts +3 -3
- package/tools/tables/editor-add-column-before-button.directive.d.ts +3 -3
- package/tools/tables/editor-add-row-after-button.directive.d.ts +3 -3
- package/tools/tables/editor-add-row-before-button.directive.d.ts +3 -3
- package/tools/tables/editor-delete-column-button.directive.d.ts +3 -3
- package/tools/tables/editor-delete-row-button.directive.d.ts +3 -3
- package/tools/tables/editor-delete-table-button.directive.d.ts +3 -3
- package/tools/typographical-emphasis/editor-bold-button.directive.d.ts +2 -9
- package/tools/typographical-emphasis/editor-italic-button.directive.d.ts +2 -9
- package/tools/typographical-emphasis/editor-strikethrough-button.directive.d.ts +2 -9
- package/tools/typographical-emphasis/editor-subscript-button.directive.d.ts +2 -9
- package/tools/typographical-emphasis/editor-superscript-button.directive.d.ts +2 -9
- package/tools/typographical-emphasis/editor-underline-button.directive.d.ts +2 -9
- package/util.d.ts +12 -1
- package/esm2020/preventable-events/paste-event-data.mjs +0 -5
- package/preventable-events/paste-event-data.d.ts +0 -21
|
@@ -6,17 +6,15 @@
|
|
|
6
6
|
* The options for applying a command to the "word" the cursor is in.
|
|
7
7
|
* Contains two properties: `before` and `after` representing regular expressions
|
|
8
8
|
* which determine the text before and after the cursor that constitutes a separate
|
|
9
|
-
* "word" the command will be applied to ([see example]({% slug toolbartools_editor %}#toc-
|
|
9
|
+
* "word" the command will be applied to ([see example]({% slug toolbartools_editor %}#toc-customizing-word-delimiters)).
|
|
10
10
|
*/
|
|
11
11
|
export interface ApplyToWordOptions {
|
|
12
12
|
/**
|
|
13
13
|
* The regular expression that sets the delimeters used to determine the start of the matching text relevant to the current cursor position.
|
|
14
|
-
* @default `/[^ !,?.\[\]{}()]+$/i`
|
|
15
14
|
*/
|
|
16
15
|
before: RegExp;
|
|
17
16
|
/**
|
|
18
17
|
* The regular expression that sets the delimeters used to determine the end of the matching text relevant to the current cursor position.
|
|
19
|
-
* @default `/^[^ !,?.\[\]{}()]+/i`
|
|
20
18
|
*/
|
|
21
19
|
after: RegExp;
|
|
22
20
|
}
|
package/common/commands.d.ts
CHANGED
|
@@ -20,6 +20,21 @@ export declare type EditorInternalCommand = 'print';
|
|
|
20
20
|
*/
|
|
21
21
|
export declare type EditorCommand = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'createLink' | 'unlink' | 'insertFile' | 'insertImage' | 'insertOrderedList' | 'insertUnorderedList' | 'insertText' | 'indent' | 'outdent' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'format' | 'fontFamily' | 'fontSize' | 'cleanFormat' | 'setHTML' | 'undo' | 'redo' | 'subscript' | 'superscript' | 'cleanFormatting' | 'foreColor' | 'backColor' | 'insertTable' | 'addColumnBefore' | 'addColumnAfter' | 'addRowBefore' | 'addRowAfter' | 'deleteRow' | 'deleteColumn' | 'mergeCells' | 'splitCell' | 'deleteTable' | 'selectAll' | 'blockquote';
|
|
22
22
|
/**
|
|
23
|
-
* The list of the dialog
|
|
23
|
+
* The list of the dialog commands that are accepted by the `openDialog` method.
|
|
24
|
+
*
|
|
25
|
+
* The supported dialog commands are:
|
|
26
|
+
* - `createLink`
|
|
27
|
+
* - `viewSource`
|
|
28
|
+
* - `insertFile`
|
|
29
|
+
* - `insertImage`
|
|
30
|
+
* - `tableWizard`
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* // Opens a `createLink` dialog.
|
|
34
|
+
* editor.openDialog('createLink');
|
|
35
|
+
*
|
|
36
|
+
* // Opens a `viewSource` dialog.
|
|
37
|
+
* editor.openDialog('viewSource');
|
|
38
|
+
* ```
|
|
24
39
|
*/
|
|
25
40
|
export declare type DialogCommand = 'createLink' | 'insertFile' | 'insertImage' | 'viewSource';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
* The settings for applying custom CSS styles to the Editor in iframe mode ([
|
|
6
|
+
* The settings for applying custom CSS styles to the Editor in iframe mode ([see example]({% slug styling_editor %}#toc-encapsulated-mode)).
|
|
7
7
|
*/
|
|
8
8
|
export interface EditorCssSettings {
|
|
9
9
|
/**
|
|
@@ -16,8 +16,6 @@ export interface EditorCssSettings {
|
|
|
16
16
|
path?: string;
|
|
17
17
|
/**
|
|
18
18
|
* Defines whether the custom styles will override or extend the built-in styles.
|
|
19
|
-
*
|
|
20
|
-
* @default true
|
|
21
19
|
*/
|
|
22
20
|
keepBuiltInCss?: boolean;
|
|
23
21
|
}
|
|
@@ -8,18 +8,10 @@
|
|
|
8
8
|
export interface FontFamilyItem {
|
|
9
9
|
/**
|
|
10
10
|
* The value of the [`font-family`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) CSS property.
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts-no-run
|
|
13
|
-
* 'Arial,"Helvetica Neue",Helvetica,sans-serif'
|
|
14
|
-
* ```
|
|
15
11
|
*/
|
|
16
12
|
fontName: string;
|
|
17
13
|
/**
|
|
18
14
|
* The text for the font name that will be displayed in the drop-down list.
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts-no-run
|
|
21
|
-
* 'Arial'
|
|
22
|
-
* ```
|
|
23
15
|
*/
|
|
24
16
|
text: string;
|
|
25
17
|
}
|
|
@@ -8,18 +8,10 @@
|
|
|
8
8
|
export interface FontSizeItem {
|
|
9
9
|
/**
|
|
10
10
|
* The value of the [`font-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) CSS property.
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts-no-run
|
|
13
|
-
* '4px'
|
|
14
|
-
* ```
|
|
15
11
|
*/
|
|
16
12
|
size: number | string;
|
|
17
13
|
/**
|
|
18
14
|
* The text for the font size that will be displayed in the drop-down list.
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts-no-run
|
|
21
|
-
* 'Small'
|
|
22
|
-
* ```
|
|
23
15
|
*/
|
|
24
16
|
text: string;
|
|
25
17
|
}
|
|
@@ -8,18 +8,10 @@
|
|
|
8
8
|
export interface FormatItem {
|
|
9
9
|
/**
|
|
10
10
|
* The tag which will be applied.
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts-no-run
|
|
13
|
-
* 'h1'
|
|
14
|
-
* ```
|
|
15
11
|
*/
|
|
16
12
|
tag: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
17
13
|
/**
|
|
18
14
|
* The text for the defined tag that will be displayed in the drop-down list.
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts-no-run
|
|
21
|
-
* 'Heading 1'
|
|
22
|
-
* ```
|
|
23
15
|
*/
|
|
24
16
|
text: string;
|
|
25
17
|
}
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
export interface PasteCleanupSettings {
|
|
9
9
|
/**
|
|
10
10
|
* If set to `true`, MS Word lists will be converted into HTML lists.
|
|
11
|
-
*
|
|
12
|
-
* @default false
|
|
13
11
|
*/
|
|
14
12
|
convertMsLists?: boolean;
|
|
15
13
|
/**
|
|
@@ -17,16 +15,13 @@ export interface PasteCleanupSettings {
|
|
|
17
15
|
*
|
|
18
16
|
* For example `<!-- comment --> <p> content </p>` will result in `<p> content </p>`
|
|
19
17
|
*
|
|
20
|
-
* @default false
|
|
21
18
|
*/
|
|
22
19
|
removeHtmlComments?: boolean;
|
|
23
20
|
/**
|
|
24
21
|
* Specifies a list of tags to be removed from the HTML.
|
|
25
|
-
* > Child nodes of removed tags will be kept in place.
|
|
26
22
|
*
|
|
27
23
|
* For example when `stripTags: ['span']`, `<p><span lang=EN-US>content</span></p>` will result in `<p>content</p>`
|
|
28
24
|
*
|
|
29
|
-
* @default []
|
|
30
25
|
*/
|
|
31
26
|
stripTags?: string[];
|
|
32
27
|
/**
|
|
@@ -34,12 +29,9 @@ export interface PasteCleanupSettings {
|
|
|
34
29
|
* When set to `'all'`, every HTML attribute will be removed.
|
|
35
30
|
* To customize the list of attributes, set `removeAttributes` to an array of the desired values.
|
|
36
31
|
*
|
|
37
|
-
* > If set to `'all'`, this option takes precedence over `removeMsClasses` and `removeMsStyles`.
|
|
38
|
-
*
|
|
39
32
|
* For example when `removeAttributes: ['lang']`, `<p><span lang=EN-US>content</span></p>`
|
|
40
33
|
* will result in `<p><span>content</span></p>`
|
|
41
34
|
*
|
|
42
|
-
* @default []
|
|
43
35
|
*/
|
|
44
36
|
removeAttributes?: string[] | 'all';
|
|
45
37
|
/**
|
|
@@ -47,7 +39,6 @@ export interface PasteCleanupSettings {
|
|
|
47
39
|
*
|
|
48
40
|
* For example `<p class="MsoNormal">pasted from MS Word</p>` will result in `<p>pasted from MS Word</p>`
|
|
49
41
|
*
|
|
50
|
-
* @default false
|
|
51
42
|
*/
|
|
52
43
|
removeMsClasses?: boolean;
|
|
53
44
|
/**
|
|
@@ -56,7 +47,6 @@ export interface PasteCleanupSettings {
|
|
|
56
47
|
* For example `<p><span style="color:#7C7C7C; mso-themecolor:accent3; mso-themeshade:191;">content</span></p>`
|
|
57
48
|
* will result in `<p><span style="color: #7C7C7C; background: silver;">content</span></p>`
|
|
58
49
|
*
|
|
59
|
-
* @default false
|
|
60
50
|
*/
|
|
61
51
|
removeMsStyles?: boolean;
|
|
62
52
|
/**
|
|
@@ -64,7 +54,6 @@ export interface PasteCleanupSettings {
|
|
|
64
54
|
*
|
|
65
55
|
* For example `<p>content <o:p>, <w:sdtPr></p>` will result in `<p>content </p>`
|
|
66
56
|
*
|
|
67
|
-
* @default true
|
|
68
57
|
*/
|
|
69
58
|
removeInvalidHTML?: boolean;
|
|
70
59
|
}
|
package/editor.component.d.ts
CHANGED
|
@@ -72,13 +72,6 @@ export declare class EditorComponent implements AfterViewInit, ControlValueAcces
|
|
|
72
72
|
* Defines a function which determines the plugins that will be used when initializing the Editor.
|
|
73
73
|
* It exposes the default plugins collection as an argument, and returns
|
|
74
74
|
* the plugins collection that will be used when creating the Editor component. ([see example]({% slug plugins_editor %}))
|
|
75
|
-
*
|
|
76
|
-
* ```ts-no-run
|
|
77
|
-
* pluginsCallback(defaultPlugins: Plugin[]): Plugin[] {
|
|
78
|
-
* const myPlugin = new Plugin({/custom plugin code/});
|
|
79
|
-
* return [...defaultPlugins, myPlugin];
|
|
80
|
-
* }
|
|
81
|
-
* ```
|
|
82
75
|
*/
|
|
83
76
|
set plugins(fn: PluginsFn);
|
|
84
77
|
get plugins(): PluginsFn;
|
|
@@ -208,67 +201,12 @@ export declare class EditorComponent implements AfterViewInit, ControlValueAcces
|
|
|
208
201
|
* ([more information and example]({% slug toolbartools_editor %}#toc-custom-tools)).
|
|
209
202
|
*
|
|
210
203
|
* @param {EditorCommand} commandName - The command that will be executed.
|
|
211
|
-
* @param {any} attr - Optional parameters for the command.
|
|
212
|
-
* the parameters do not expect specific attributes when you call them:
|
|
213
|
-
* - `format` - Accepts an object with the `tag` property.
|
|
214
|
-
* The supported tags are `p` and any of the `h1` to `h6` heading tags.
|
|
215
|
-
* - `createLink` - Accepts an object with the `href`, `title`, and `target` properties. The `href` property is mandatory.
|
|
216
|
-
* - `setHTML` - Accepts a `string` parameter.
|
|
217
|
-
* - `insertTable` - Accepts an object with the `rows` and `cols` properties. The number values are zero based.
|
|
218
|
-
*
|
|
219
|
-
* @example
|
|
220
|
-
* ```ts-no-run
|
|
221
|
-
* // Toggles the bold styling.
|
|
222
|
-
* editor.exec('bold');
|
|
223
|
-
*
|
|
224
|
-
* // Creates a bullet list.
|
|
225
|
-
* editor.exec('insertUnorderedList');
|
|
226
|
-
*
|
|
227
|
-
* // Creates a link.
|
|
228
|
-
* editor.exec('createLink', { href: 'www.progress.com', title: 'Progress', target: 'window' });
|
|
229
|
-
*
|
|
230
|
-
* // Inserts a file.
|
|
231
|
-
* editor.exec('insertFile', { href: 'www.progress.com/resources/myfile.doc', title: 'My file', target: 'window' });
|
|
232
|
-
*
|
|
233
|
-
* // Inserts a image.
|
|
234
|
-
* editor.exec('insertImage', { src: 'www.progress.com/resources/logo.jpg', title: 'Progress', target: 'window' });
|
|
235
|
-
*
|
|
236
|
-
* // Inserts a text at a given position. If no position is specified, the text will be inserted after the cursor.
|
|
237
|
-
* editor.exec('insertText', { text: 'Hello World!', from: 0, to: 0 });
|
|
238
|
-
*
|
|
239
|
-
* // Changes the format of a text block.
|
|
240
|
-
* editor.exec('format', { tag: 'h2' });
|
|
241
|
-
*
|
|
242
|
-
* // Changes the font size of the selected text.
|
|
243
|
-
* editor.exec('fontSize', 24);
|
|
244
|
-
*
|
|
245
|
-
* // Changes the content of the Editor.
|
|
246
|
-
* editor.exec('setHTML', '<p>HTML content</p>');
|
|
247
|
-
*
|
|
248
|
-
* // Creates and inserts a table with the specified number of rows and columns. Numbers are zero based.
|
|
249
|
-
* this.editor.exec("insertTable", { rows: 3, cols: 5 });
|
|
250
|
-
* ```
|
|
204
|
+
* @param {any} attr - Optional parameters for the command.
|
|
251
205
|
*/
|
|
252
206
|
exec(commandName: EditorCommand, attr?: any): void;
|
|
253
207
|
/**
|
|
254
208
|
* Opens a dialog.
|
|
255
209
|
* @param {DialogCommand} dialogName - The name of the dialog that will open.
|
|
256
|
-
*
|
|
257
|
-
* The supported values are:
|
|
258
|
-
* * `createLink`
|
|
259
|
-
* * `viewSource`
|
|
260
|
-
* * `insertFile`
|
|
261
|
-
* * `insertImage`
|
|
262
|
-
* * `tableWizard`
|
|
263
|
-
*
|
|
264
|
-
* @example
|
|
265
|
-
* ```ts-no-run
|
|
266
|
-
* // Opens a `createLink` dialog.
|
|
267
|
-
* editor.openDialog('createLink');
|
|
268
|
-
*
|
|
269
|
-
* // Opens a `viewSource` dialog.
|
|
270
|
-
* editor.openDialog('viewSource');
|
|
271
|
-
* ```
|
|
272
210
|
*/
|
|
273
211
|
openDialog(dialogName: DialogCommand): void;
|
|
274
212
|
/**
|
package/editor.module.d.ts
CHANGED
|
@@ -72,40 +72,19 @@ import * as i66 from "@progress/kendo-angular-label";
|
|
|
72
72
|
/**
|
|
73
73
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Editor component.
|
|
74
74
|
*
|
|
75
|
-
* The package exports:
|
|
76
|
-
* - `EditorComponent`—The `EditorComponent` class.
|
|
77
|
-
* - `EditorButtonDirective`—The `EditorButton` directive class.
|
|
78
|
-
* - `EditorDropDownDirective`—The `EditorDropDown` directive class.
|
|
79
|
-
* - `EditorDialogDirective`—The `EditorDialog` directive class.
|
|
80
|
-
* - `ToolBarDropDownListComponent`—The `ToolBarDropDownListComponent` directive class.
|
|
81
|
-
* - `ButtonModule`—The `KendoButton` module.
|
|
82
|
-
* - `ToolBarModule`—The `KendoToolBar` module.
|
|
83
|
-
*
|
|
84
|
-
* * @example
|
|
85
|
-
*
|
|
86
75
|
* ```ts-no-run
|
|
87
|
-
* // Import the Editor module
|
|
88
|
-
* import { EditorModule } from '@progress/kendo-angular-editor';
|
|
89
|
-
*
|
|
90
|
-
* // The browser platform with a compiler
|
|
91
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
92
|
-
*
|
|
93
76
|
* import { NgModule } from '@angular/core';
|
|
94
|
-
*
|
|
95
|
-
*
|
|
77
|
+
* import { EditorModule } from '@progress/kendo-angular-editor';
|
|
78
|
+
* import { BrowserModule } from "@angular/platform-browser";
|
|
96
79
|
* import { AppComponent } from './app.component';
|
|
97
80
|
*
|
|
98
|
-
* // Define the app module
|
|
99
81
|
* _@NgModule({
|
|
100
|
-
* declarations: [AppComponent],
|
|
101
|
-
* imports: [BrowserModule, EditorModule],
|
|
82
|
+
* declarations: [AppComponent],
|
|
83
|
+
* imports: [BrowserModule, EditorModule],
|
|
102
84
|
* bootstrap: [AppComponent]
|
|
103
85
|
* })
|
|
104
86
|
* export class AppModule {}
|
|
105
87
|
*
|
|
106
|
-
* // Compile and launch the module
|
|
107
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
108
|
-
*
|
|
109
88
|
* ```
|
|
110
89
|
*/
|
|
111
90
|
export declare class EditorModule {
|
|
@@ -330,13 +330,6 @@ export class EditorComponent {
|
|
|
330
330
|
* Defines a function which determines the plugins that will be used when initializing the Editor.
|
|
331
331
|
* It exposes the default plugins collection as an argument, and returns
|
|
332
332
|
* the plugins collection that will be used when creating the Editor component. ([see example]({% slug plugins_editor %}))
|
|
333
|
-
*
|
|
334
|
-
* ```ts-no-run
|
|
335
|
-
* pluginsCallback(defaultPlugins: Plugin[]): Plugin[] {
|
|
336
|
-
* const myPlugin = new Plugin({/custom plugin code/});
|
|
337
|
-
* return [...defaultPlugins, myPlugin];
|
|
338
|
-
* }
|
|
339
|
-
* ```
|
|
340
333
|
*/
|
|
341
334
|
set plugins(fn) {
|
|
342
335
|
if (isDevMode) {
|
|
@@ -469,46 +462,7 @@ export class EditorComponent {
|
|
|
469
462
|
* ([more information and example]({% slug toolbartools_editor %}#toc-custom-tools)).
|
|
470
463
|
*
|
|
471
464
|
* @param {EditorCommand} commandName - The command that will be executed.
|
|
472
|
-
* @param {any} attr - Optional parameters for the command.
|
|
473
|
-
* the parameters do not expect specific attributes when you call them:
|
|
474
|
-
* - `format` - Accepts an object with the `tag` property.
|
|
475
|
-
* The supported tags are `p` and any of the `h1` to `h6` heading tags.
|
|
476
|
-
* - `createLink` - Accepts an object with the `href`, `title`, and `target` properties. The `href` property is mandatory.
|
|
477
|
-
* - `setHTML` - Accepts a `string` parameter.
|
|
478
|
-
* - `insertTable` - Accepts an object with the `rows` and `cols` properties. The number values are zero based.
|
|
479
|
-
*
|
|
480
|
-
* @example
|
|
481
|
-
* ```ts-no-run
|
|
482
|
-
* // Toggles the bold styling.
|
|
483
|
-
* editor.exec('bold');
|
|
484
|
-
*
|
|
485
|
-
* // Creates a bullet list.
|
|
486
|
-
* editor.exec('insertUnorderedList');
|
|
487
|
-
*
|
|
488
|
-
* // Creates a link.
|
|
489
|
-
* editor.exec('createLink', { href: 'www.progress.com', title: 'Progress', target: 'window' });
|
|
490
|
-
*
|
|
491
|
-
* // Inserts a file.
|
|
492
|
-
* editor.exec('insertFile', { href: 'www.progress.com/resources/myfile.doc', title: 'My file', target: 'window' });
|
|
493
|
-
*
|
|
494
|
-
* // Inserts a image.
|
|
495
|
-
* editor.exec('insertImage', { src: 'www.progress.com/resources/logo.jpg', title: 'Progress', target: 'window' });
|
|
496
|
-
*
|
|
497
|
-
* // Inserts a text at a given position. If no position is specified, the text will be inserted after the cursor.
|
|
498
|
-
* editor.exec('insertText', { text: 'Hello World!', from: 0, to: 0 });
|
|
499
|
-
*
|
|
500
|
-
* // Changes the format of a text block.
|
|
501
|
-
* editor.exec('format', { tag: 'h2' });
|
|
502
|
-
*
|
|
503
|
-
* // Changes the font size of the selected text.
|
|
504
|
-
* editor.exec('fontSize', 24);
|
|
505
|
-
*
|
|
506
|
-
* // Changes the content of the Editor.
|
|
507
|
-
* editor.exec('setHTML', '<p>HTML content</p>');
|
|
508
|
-
*
|
|
509
|
-
* // Creates and inserts a table with the specified number of rows and columns. Numbers are zero based.
|
|
510
|
-
* this.editor.exec("insertTable", { rows: 3, cols: 5 });
|
|
511
|
-
* ```
|
|
465
|
+
* @param {any} attr - Optional parameters for the command.
|
|
512
466
|
*/
|
|
513
467
|
exec(commandName, attr) {
|
|
514
468
|
// normalizes setHTML attributes
|
|
@@ -534,22 +488,6 @@ export class EditorComponent {
|
|
|
534
488
|
/**
|
|
535
489
|
* Opens a dialog.
|
|
536
490
|
* @param {DialogCommand} dialogName - The name of the dialog that will open.
|
|
537
|
-
*
|
|
538
|
-
* The supported values are:
|
|
539
|
-
* * `createLink`
|
|
540
|
-
* * `viewSource`
|
|
541
|
-
* * `insertFile`
|
|
542
|
-
* * `insertImage`
|
|
543
|
-
* * `tableWizard`
|
|
544
|
-
*
|
|
545
|
-
* @example
|
|
546
|
-
* ```ts-no-run
|
|
547
|
-
* // Opens a `createLink` dialog.
|
|
548
|
-
* editor.openDialog('createLink');
|
|
549
|
-
*
|
|
550
|
-
* // Opens a `viewSource` dialog.
|
|
551
|
-
* editor.openDialog('viewSource');
|
|
552
|
-
* ```
|
|
553
491
|
*/
|
|
554
492
|
openDialog(dialogName) {
|
|
555
493
|
const editorDialogs = {
|
|
@@ -160,40 +160,19 @@ const INTERNAL_COMPONENTS = [
|
|
|
160
160
|
/**
|
|
161
161
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Editor component.
|
|
162
162
|
*
|
|
163
|
-
* The package exports:
|
|
164
|
-
* - `EditorComponent`—The `EditorComponent` class.
|
|
165
|
-
* - `EditorButtonDirective`—The `EditorButton` directive class.
|
|
166
|
-
* - `EditorDropDownDirective`—The `EditorDropDown` directive class.
|
|
167
|
-
* - `EditorDialogDirective`—The `EditorDialog` directive class.
|
|
168
|
-
* - `ToolBarDropDownListComponent`—The `ToolBarDropDownListComponent` directive class.
|
|
169
|
-
* - `ButtonModule`—The `KendoButton` module.
|
|
170
|
-
* - `ToolBarModule`—The `KendoToolBar` module.
|
|
171
|
-
*
|
|
172
|
-
* * @example
|
|
173
|
-
*
|
|
174
163
|
* ```ts-no-run
|
|
175
|
-
* // Import the Editor module
|
|
176
|
-
* import { EditorModule } from '@progress/kendo-angular-editor';
|
|
177
|
-
*
|
|
178
|
-
* // The browser platform with a compiler
|
|
179
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
180
|
-
*
|
|
181
164
|
* import { NgModule } from '@angular/core';
|
|
182
|
-
*
|
|
183
|
-
*
|
|
165
|
+
* import { EditorModule } from '@progress/kendo-angular-editor';
|
|
166
|
+
* import { BrowserModule } from "@angular/platform-browser";
|
|
184
167
|
* import { AppComponent } from './app.component';
|
|
185
168
|
*
|
|
186
|
-
* // Define the app module
|
|
187
169
|
* _@NgModule({
|
|
188
|
-
* declarations: [AppComponent],
|
|
189
|
-
* imports: [BrowserModule, EditorModule],
|
|
170
|
+
* declarations: [AppComponent],
|
|
171
|
+
* imports: [BrowserModule, EditorModule],
|
|
190
172
|
* bootstrap: [AppComponent]
|
|
191
173
|
* })
|
|
192
174
|
* export class AppModule {}
|
|
193
175
|
*
|
|
194
|
-
* // Compile and launch the module
|
|
195
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
196
|
-
*
|
|
197
176
|
* ```
|
|
198
177
|
*/
|
|
199
178
|
export class EditorModule {
|
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
10
|
/**
|
|
11
11
|
* Custom component messages override default component messages
|
|
12
|
-
* ([see example]({% slug globalization_editor %}#toc-
|
|
12
|
+
* ([see example]({% slug globalization_editor %}#toc-custom-messages)).
|
|
13
13
|
*/
|
|
14
14
|
export class CustomMessagesComponent extends MessagesDirective {
|
|
15
15
|
constructor(service) {
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-editor',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '13.1.
|
|
12
|
+
publishDate: 1688385076,
|
|
13
|
+
version: '13.1.1-develop.1',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -14,22 +14,15 @@ import * as i2 from "../../localization/editor-localization.service";
|
|
|
14
14
|
import * as i3 from "../../common/provider.service";
|
|
15
15
|
import * as i4 from "../tools.service";
|
|
16
16
|
/**
|
|
17
|
-
* A directive which configures an existing `ToolBarButtonComponent` as an Editor AlignCenter tool
|
|
17
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor **AlignCenter** tool
|
|
18
18
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
19
|
-
* The directive will predefine the
|
|
19
|
+
* The directive will predefine the SVG icon and `click` event handlers of the button.
|
|
20
20
|
* In addition, the directive updates the `selected` state of the button according to the cursor position in the editing area.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```html
|
|
24
24
|
* <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>
|
|
25
25
|
* ```
|
|
26
|
-
*
|
|
27
|
-
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```html
|
|
31
|
-
* <kendo-toolbar-button kendoEditorAlignCenterButton ></kendo-toolbar-button>
|
|
32
|
-
* ```
|
|
33
26
|
*/
|
|
34
27
|
export class EditorAlignCenterButtonDirective extends EditorCommandButton {
|
|
35
28
|
constructor(button, localization, providerService, toolsService) {
|
|
@@ -14,22 +14,15 @@ import * as i2 from "../../localization/editor-localization.service";
|
|
|
14
14
|
import * as i3 from "../../common/provider.service";
|
|
15
15
|
import * as i4 from "../tools.service";
|
|
16
16
|
/**
|
|
17
|
-
* A directive which configures an existing `ToolBarButtonComponent` as an Editor AlignJustify tool
|
|
17
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor **AlignJustify** tool
|
|
18
18
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
19
|
-
* The directive will predefine the
|
|
19
|
+
* The directive will predefine the SVG icon and `click` event handlers of the button.
|
|
20
20
|
* In addition, the directive updates the `selected` state of the button according to the cursor position in the editing area.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```html
|
|
24
24
|
* <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>
|
|
25
25
|
* ```
|
|
26
|
-
*
|
|
27
|
-
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```html
|
|
31
|
-
* <kendo-toolbar-button kendoEditorAlignJustifyButton ></kendo-toolbar-button>
|
|
32
|
-
* ```
|
|
33
26
|
*/
|
|
34
27
|
export class EditorAlignJustifyButtonDirective extends EditorCommandButton {
|
|
35
28
|
constructor(button, localization, providerService, toolsService) {
|
|
@@ -14,22 +14,15 @@ import * as i2 from "../../localization/editor-localization.service";
|
|
|
14
14
|
import * as i3 from "../../common/provider.service";
|
|
15
15
|
import * as i4 from "../tools.service";
|
|
16
16
|
/**
|
|
17
|
-
* A directive which configures an existing `ToolBarButtonComponent` as an Editor AlignLeft tool
|
|
17
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor **AlignLeft** tool
|
|
18
18
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
19
|
-
* The directive will predefine the
|
|
19
|
+
* The directive will predefine the SVG icon and `click` event handlers of the button.
|
|
20
20
|
* In addition, the directive updates the `selected` state of the button according to the cursor position in the editing area.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```html
|
|
24
24
|
* <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>
|
|
25
25
|
* ```
|
|
26
|
-
*
|
|
27
|
-
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```html
|
|
31
|
-
* <kendo-toolbar-button kendoEditorAlignLeftButton ></kendo-toolbar-button>
|
|
32
|
-
* ```
|
|
33
26
|
*/
|
|
34
27
|
export class EditorAlignLeftButtonDirective extends EditorCommandButton {
|
|
35
28
|
constructor(button, localization, providerService, toolsService) {
|
|
@@ -14,22 +14,15 @@ import * as i2 from "../../localization/editor-localization.service";
|
|
|
14
14
|
import * as i3 from "../../common/provider.service";
|
|
15
15
|
import * as i4 from "../tools.service";
|
|
16
16
|
/**
|
|
17
|
-
* A directive which configures an existing `ToolBarButtonComponent` as an Editor AlignRight tool
|
|
17
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor **AlignRight** tool
|
|
18
18
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
19
|
-
* The directive will predefine the
|
|
19
|
+
* The directive will predefine the SVG icon and `click` event handlers of the button.
|
|
20
20
|
* In addition, the directive updates the `selected` state of the button according to the cursor position in the editing area.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```html
|
|
24
24
|
* <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>
|
|
25
25
|
* ```
|
|
26
|
-
*
|
|
27
|
-
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```html
|
|
31
|
-
* <kendo-toolbar-button kendoEditorAlignRightButton ></kendo-toolbar-button>
|
|
32
|
-
* ```
|
|
33
26
|
*/
|
|
34
27
|
export class EditorAlignRightButtonDirective extends EditorCommandButton {
|
|
35
28
|
constructor(button, localization, providerService, toolsService) {
|
|
@@ -14,21 +14,14 @@ import * as i2 from "../../localization/editor-localization.service";
|
|
|
14
14
|
import * as i3 from "../../common/provider.service";
|
|
15
15
|
import * as i4 from "../tools.service";
|
|
16
16
|
/**
|
|
17
|
-
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Blockquote tool
|
|
17
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor **Blockquote** tool
|
|
18
18
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
19
|
-
* The directive will predefine the
|
|
19
|
+
* The directive will predefine the SVG icon and `click` event handlers of the button.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```html
|
|
23
23
|
* <kendo-toolbar-button kendoEditorBlockquoteButton></kendo-toolbar-button>
|
|
24
24
|
* ```
|
|
25
|
-
*
|
|
26
|
-
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```html
|
|
30
|
-
* <kendo-toolbar-button kendoEditorBlockquoteButton ></kendo-toolbar-button>
|
|
31
|
-
* ```
|
|
32
25
|
*/
|
|
33
26
|
export class EditorBlockquoteDirective extends EditorCommandButton {
|
|
34
27
|
constructor(button, localization, providerService, toolsService) {
|
|
@@ -11,6 +11,10 @@ import * as i1 from "./editor-colorpicker.component";
|
|
|
11
11
|
* A directive which configures an `EditorColorPickerComponent`
|
|
12
12
|
* for manipulating the background color of the text
|
|
13
13
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <kendo-toolbar-colorpicker kendoEditorBackColor view="gradient"> </kendo-toolbar-colorpicker>
|
|
17
|
+
* ```
|
|
14
18
|
*/
|
|
15
19
|
export class EditorBackColorDirective {
|
|
16
20
|
constructor(colorPicker) {
|
|
@@ -23,7 +23,7 @@ import * as i6 from "@angular/common";
|
|
|
23
23
|
/**
|
|
24
24
|
* A component which configures an existing ColorPickerComponent as a ToolBar tool.
|
|
25
25
|
* To associate a `kendo-toolbar-colorpicker` with an Editor command that changes the
|
|
26
|
-
* foreground or the background color of the text, use the `kendoEditorForeColor` or `kendoEditorBackColor`
|
|
26
|
+
* foreground or the background color of the text, use the `kendoEditorForeColor` or `kendoEditorBackColor` directivе ([more information]({% slug toolbartools_editor %}#toc-colorpickers)).
|
|
27
27
|
*/
|
|
28
28
|
export class EditorColorPickerComponent extends ToolBarToolComponent {
|
|
29
29
|
constructor(localization, dialogService, ngZone, providerService, renderer) {
|
|
@@ -35,6 +35,8 @@ export class EditorColorPickerComponent extends ToolBarToolComponent {
|
|
|
35
35
|
this.tabindex = -1;
|
|
36
36
|
/**
|
|
37
37
|
* Specifies if the component should be disabled.
|
|
38
|
+
*
|
|
39
|
+
* @default false
|
|
38
40
|
*/
|
|
39
41
|
this.disabled = false;
|
|
40
42
|
/**
|
|
@@ -11,6 +11,10 @@ import * as i1 from "./editor-colorpicker.component";
|
|
|
11
11
|
* A directive which configures an `EditorColorPickerComponent`
|
|
12
12
|
* for manipulating the foreground color of the text
|
|
13
13
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <kendo-toolbar-colorpicker kendoEditorForeColor ></kendo-toolbar-colorpicker>
|
|
17
|
+
* ```
|
|
14
18
|
*/
|
|
15
19
|
export class EditorForeColorDirective {
|
|
16
20
|
constructor(colorPicker) {
|
|
@@ -14,21 +14,14 @@ import * as i2 from "../localization/editor-localization.service";
|
|
|
14
14
|
import * as i3 from "../common/provider.service";
|
|
15
15
|
import * as i4 from "./tools.service";
|
|
16
16
|
/**
|
|
17
|
-
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Clean Formatting tool
|
|
17
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor **Clean Formatting** tool
|
|
18
18
|
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
19
|
-
* The directive will predefine the
|
|
19
|
+
* The directive will predefine the SVG icon and `click` event handlers of the button.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```html
|
|
23
23
|
* <kendo-toolbar-button kendoEditorCleanFormattingButton></kendo-toolbar-button>
|
|
24
24
|
* ```
|
|
25
|
-
*
|
|
26
|
-
* The following example demonstrates how to change the default icon applied by the directive.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```html
|
|
30
|
-
* <kendo-toolbar-button kendoEditorCleanFormattingButton ></kendo-toolbar-button>
|
|
31
|
-
* ```
|
|
32
25
|
*/
|
|
33
26
|
export class EditorCleanFormattingButtonDirective extends EditorCommandButton {
|
|
34
27
|
constructor(button, localization, providerService, toolsService) {
|