@progress/kendo-angular-editor 2.4.2 → 2.5.0-dev.202111240844

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 (60) hide show
  1. package/dist/cdn/js/kendo-angular-editor.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/common/error-messages.js +2 -1
  4. package/dist/es/common/styles.js +1 -1
  5. package/dist/es/config/command-icons.js +4 -2
  6. package/dist/es/config/commands.js +32 -31
  7. package/dist/es/editor-toolbar-state.js +20 -2
  8. package/dist/es/editor.component.js +7 -5
  9. package/dist/es/editor.module.js +7 -1
  10. package/dist/es/index.js +2 -0
  11. package/dist/es/localization/messages.js +8 -0
  12. package/dist/es/package-metadata.js +1 -1
  13. package/dist/es/tools/print/editor-print-button.directive.js +67 -0
  14. package/dist/es/tools/select-all/select-all-button.directive.js +48 -0
  15. package/dist/es/tools/shared/editor-command-base.js +10 -10
  16. package/dist/es/tools/tables/editor-insert-table-button.component.js +5 -8
  17. package/dist/es2015/common/commands.d.ts +5 -1
  18. package/dist/es2015/common/error-messages.js +2 -1
  19. package/dist/es2015/common/styles.d.ts +1 -1
  20. package/dist/es2015/common/styles.js +72 -0
  21. package/dist/es2015/config/command-icons.d.ts +2 -2
  22. package/dist/es2015/config/command-icons.js +4 -2
  23. package/dist/es2015/config/commands.js +31 -30
  24. package/dist/es2015/editor-toolbar-state.js +20 -2
  25. package/dist/es2015/editor.component.d.ts +5 -0
  26. package/dist/es2015/editor.component.js +10 -4
  27. package/dist/es2015/editor.module.js +7 -1
  28. package/dist/es2015/index.d.ts +2 -0
  29. package/dist/es2015/index.js +2 -0
  30. package/dist/es2015/index.metadata.json +1 -1
  31. package/dist/es2015/localization/messages.d.ts +8 -0
  32. package/dist/es2015/localization/messages.js +8 -0
  33. package/dist/es2015/package-metadata.js +1 -1
  34. package/dist/es2015/tools/print/editor-print-button.directive.d.ts +33 -0
  35. package/dist/es2015/tools/print/editor-print-button.directive.js +64 -0
  36. package/dist/es2015/tools/select-all/select-all-button.directive.d.ts +29 -0
  37. package/dist/es2015/tools/select-all/select-all-button.directive.js +46 -0
  38. package/dist/es2015/tools/shared/editor-command-base.d.ts +3 -3
  39. package/dist/es2015/tools/shared/editor-command-base.js +9 -9
  40. package/dist/es2015/tools/shared/editor-command-button.d.ts +3 -3
  41. package/dist/es2015/tools/tables/editor-insert-table-button.component.d.ts +2 -3
  42. package/dist/es2015/tools/tables/editor-insert-table-button.component.js +13 -8
  43. package/dist/fesm2015/index.js +263 -57
  44. package/dist/fesm5/index.js +188 -61
  45. package/dist/npm/common/error-messages.js +2 -1
  46. package/dist/npm/common/styles.js +1 -1
  47. package/dist/npm/config/command-icons.js +4 -2
  48. package/dist/npm/config/commands.js +33 -31
  49. package/dist/npm/editor-toolbar-state.js +20 -2
  50. package/dist/npm/editor.component.js +6 -4
  51. package/dist/npm/editor.module.js +7 -1
  52. package/dist/npm/index.js +4 -0
  53. package/dist/npm/localization/messages.js +8 -0
  54. package/dist/npm/package-metadata.js +1 -1
  55. package/dist/npm/tools/print/editor-print-button.directive.js +69 -0
  56. package/dist/npm/tools/select-all/select-all-button.directive.js +50 -0
  57. package/dist/npm/tools/shared/editor-command-base.js +10 -10
  58. package/dist/npm/tools/tables/editor-insert-table-button.component.js +5 -8
  59. package/dist/systemjs/kendo-angular-editor.js +1 -1
  60. package/package.json +1 -1
@@ -10,7 +10,7 @@ import { take, filter, auditTime, map, concatMap, takeUntil } from 'rxjs/operato
10
10
  import { ToolBarComponent, ToolBarToolComponent, ToolBarButtonComponent, ToolBarModule } from '@progress/kendo-angular-toolbar';
11
11
  import { DialogContentBase, DialogRef, DialogService, DialogModule } from '@progress/kendo-angular-dialog';
12
12
  import { isDocumentAvailable, guid, KendoInput, Keys } from '@progress/kendo-angular-common';
13
- import { nodes, Schema, marks, Selection, SelectionRange, TextSelection, Fragment, Slice, NodeSelection, insertNode, expandToWordWrap, toggleInlineFormat, bold, cleanFormatting, applyLink, applyInlineStyle, insertText, italic, strikethrough, subscript, superscript, underline, removeLink, link, isAligned, alignCenterRules, alignBlocks, alignRemoveRules, alignJustifyRules, alignLeftRules, alignRightRules, formatBlockElements, getHtml, indent, insertImage, toggleOrderedList, toggleUnorderedList, outdent, redo, setHtml, undo, hasMark, activeNode, canIndentAsListItem, canBeIndented, indentRules, hasNode, canOutdentAsListItem, outdentRules, getActiveMarks, expandSelection, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell, deleteTable, getNodeFromSelection, getMark, getSelectionText, parseContent, Plugin, PluginKey, history, keymap, buildListKeymap, buildKeymap, baseKeymap, gapCursor, placeholder, EditorState, EditorView, hasSameMarkup, pasteCleanup, removeComments, sanitize, removeAttribute, sanitizeStyleAttr, sanitizeClassAttr } from '@progress/kendo-editor-common';
13
+ import { nodes, Schema, marks, Selection, SelectionRange, TextSelection, Fragment, Slice, NodeSelection, insertNode, expandToWordWrap, toggleInlineFormat, bold, cleanFormatting, applyLink, applyInlineStyle, insertText, italic, strikethrough, subscript, superscript, underline, removeLink, link, selectAll, isAligned, alignCenterRules, alignBlocks, alignRemoveRules, alignJustifyRules, alignLeftRules, alignRightRules, formatBlockElements, getHtml, indent, insertImage, toggleOrderedList, toggleUnorderedList, outdent, redo, setHtml, undo, hasMark, activeNode, canIndentAsListItem, canBeIndented, indentRules, hasNode, canOutdentAsListItem, outdentRules, getActiveMarks, expandSelection, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell, deleteTable, getNodeFromSelection, getMark, getSelectionText, parseContent, Plugin, PluginKey, history, keymap, buildListKeymap, buildKeymap, baseKeymap, gapCursor, imageResizing, placeholder, EditorState, EditorView, hasSameMarkup, pasteCleanup, removeComments, sanitize, removeAttribute, sanitizeStyleAttr, sanitizeClassAttr } from '@progress/kendo-editor-common';
14
14
  export { Schema, EditorState, Plugin, PluginKey, Transaction, EditorView, Decoration, DecorationSet, NodeType, Node, MarkType, Mark, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, baseKeymap, history, dropCursor, gapCursor, tableNodes, getSelectionText } from '@progress/kendo-editor-common';
15
15
  import { validatePackage } from '@progress/kendo-licensing';
16
16
  import { LocalizationService, L10N_PREFIX, RTL, MessageService, ComponentMessages } from '@progress/kendo-angular-l10n';
@@ -27,7 +27,7 @@ const packageMetadata = {
27
27
  name: '@progress/kendo-angular-editor',
28
28
  productName: 'Kendo UI for Angular',
29
29
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
30
- publishDate: 1635941024,
30
+ publishDate: 1637743184,
31
31
  version: '',
32
32
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
33
33
  };
@@ -1607,7 +1607,7 @@ const deleteTableElement = (selector) => (state, dispatch) => {
1607
1607
  const deleteTable$1 = deleteTableElement(isTable);
1608
1608
 
1609
1609
  const alignRemove = (state, dispatch) => alignBlocks(alignRemoveRules)(state, dispatch);
1610
- const ɵ1$5 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord })), ɵ2$4 = (options) => cleanFormatting(options), ɵ3$4 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }), ɵ4$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ5$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value + 'px', applyToWord: attrs.applyToWord }), ɵ6$1 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }), ɵ7$1 = text => insertText(text), ɵ8$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord })), ɵ9$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, strikethrough, { applyToWord })), ɵ10 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, subscript, { applyToWord })), ɵ11 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, superscript, { applyToWord })), ɵ12 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, underline, { applyToWord })), ɵ13 = () => removeLink(link), ɵ14 = attrs => expandToWordWrap(applyInlineStyle, { style: 'color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ15 = attrs => expandToWordWrap(applyInlineStyle, { style: 'background-color', value: attrs.value, applyToWord: attrs.applyToWord });
1610
+ const ɵ1$5 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, bold, { applyToWord })), ɵ2$4 = (options) => cleanFormatting(options), ɵ3$4 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs.value, applyToWord: attrs.applyToWord }), ɵ4$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-family', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ5$2 = attrs => expandToWordWrap(applyInlineStyle, { style: 'font-size', value: attrs.value + 'px', applyToWord: attrs.applyToWord }), ɵ6$1 = attrs => expandToWordWrap(applyLink, { mark: 'link', attrs: attrs, applyToWord: attrs.applyToWord }), ɵ7$1 = text => insertText(text), ɵ8$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, italic, { applyToWord })), ɵ9$1 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, strikethrough, { applyToWord })), ɵ10 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, subscript, { applyToWord })), ɵ11 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, superscript, { applyToWord })), ɵ12 = (applyToWord) => expandToWordWrap(toggleInlineFormat, Object.assign({}, underline, { applyToWord })), ɵ13 = () => removeLink(link), ɵ14 = attrs => expandToWordWrap(applyInlineStyle, { style: 'color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ15 = attrs => expandToWordWrap(applyInlineStyle, { style: 'background-color', value: attrs.value, applyToWord: attrs.applyToWord }), ɵ16 = () => (state, dispatch) => selectAll(state, dispatch);
1611
1611
  const inlineCommand = {
1612
1612
  bold: ɵ1$5,
1613
1613
  cleanFormatting: ɵ2$4,
@@ -1623,39 +1623,40 @@ const inlineCommand = {
1623
1623
  underline: ɵ12,
1624
1624
  unlink: ɵ13,
1625
1625
  foreColor: ɵ14,
1626
- backColor: ɵ15
1626
+ backColor: ɵ15,
1627
+ selectAll: ɵ16
1627
1628
  };
1628
- const ɵ16 = () => (state, dispatch) => isAligned(state, alignCenterRules) ? alignRemove(state, dispatch) : alignBlocks(alignCenterRules)(state, dispatch), ɵ17 = () => (state, dispatch) => isAligned(state, alignJustifyRules) ? alignRemove(state, dispatch) : alignBlocks(alignJustifyRules)(state, dispatch), ɵ18 = () => (state, dispatch) => isAligned(state, alignLeftRules) ? alignRemove(state, dispatch) : alignBlocks(alignLeftRules)(state, dispatch), ɵ19 = () => (state, dispatch) => isAligned(state, alignRightRules) ? alignRemove(state, dispatch) : alignBlocks(alignRightRules)(state, dispatch), ɵ20 = formatAttr => formatBlockElements(formatAttr.tag), ɵ21 = () => getHtml, ɵ22 = () => indent, ɵ23 = attrs => insertImage(attrs), ɵ24 = () => toggleOrderedList, ɵ25 = () => toggleUnorderedList, ɵ26 = () => outdent, ɵ27 = () => redo, ɵ28 = ({ content, parseOptions }) => setHtml(content, 'setHTML', parseOptions), ɵ29 = () => undo;
1629
+ const ɵ17 = () => (state, dispatch) => isAligned(state, alignCenterRules) ? alignRemove(state, dispatch) : alignBlocks(alignCenterRules)(state, dispatch), ɵ18 = () => (state, dispatch) => isAligned(state, alignJustifyRules) ? alignRemove(state, dispatch) : alignBlocks(alignJustifyRules)(state, dispatch), ɵ19 = () => (state, dispatch) => isAligned(state, alignLeftRules) ? alignRemove(state, dispatch) : alignBlocks(alignLeftRules)(state, dispatch), ɵ20 = () => (state, dispatch) => isAligned(state, alignRightRules) ? alignRemove(state, dispatch) : alignBlocks(alignRightRules)(state, dispatch), ɵ21 = formatAttr => formatBlockElements(formatAttr.tag), ɵ22 = () => getHtml, ɵ23 = () => indent, ɵ24 = attrs => insertImage(attrs), ɵ25 = () => toggleOrderedList, ɵ26 = () => toggleUnorderedList, ɵ27 = () => outdent, ɵ28 = () => redo, ɵ29 = ({ content, parseOptions }) => setHtml(content, 'setHTML', parseOptions), ɵ30 = () => undo;
1629
1630
  const blockCommand = {
1630
- alignCenter: ɵ16,
1631
- alignJustify: ɵ17,
1632
- alignLeft: ɵ18,
1633
- alignRight: ɵ19,
1634
- format: ɵ20,
1635
- getHTML: ɵ21,
1636
- indent: ɵ22,
1637
- insertImage: ɵ23,
1631
+ alignCenter: ɵ17,
1632
+ alignJustify: ɵ18,
1633
+ alignLeft: ɵ19,
1634
+ alignRight: ɵ20,
1635
+ format: ɵ21,
1636
+ getHTML: ɵ22,
1637
+ indent: ɵ23,
1638
+ insertImage: ɵ24,
1638
1639
  // think about changing the command name.
1639
- insertOrderedList: ɵ24,
1640
+ insertOrderedList: ɵ25,
1640
1641
  // think about changing the command name.
1641
- insertUnorderedList: ɵ25,
1642
- outdent: ɵ26,
1643
- redo: ɵ27,
1644
- setHTML: ɵ28,
1645
- undo: ɵ29
1642
+ insertUnorderedList: ɵ26,
1643
+ outdent: ɵ27,
1644
+ redo: ɵ28,
1645
+ setHTML: ɵ29,
1646
+ undo: ɵ30
1646
1647
  };
1647
- const ɵ30 = attr => insertTable(attr), ɵ31 = () => addColumnBefore$1, ɵ32 = () => addColumnAfter$1, ɵ33 = () => addRowBefore$1, ɵ34 = () => addRowAfter$1, ɵ35 = () => deleteRow$1, ɵ36 = () => deleteColumn$1, ɵ37 = () => mergeCells$1, ɵ38 = () => splitCell$1, ɵ39 = () => deleteTable$1;
1648
+ const ɵ31 = attr => insertTable(attr), ɵ32 = () => addColumnBefore$1, ɵ33 = () => addColumnAfter$1, ɵ34 = () => addRowBefore$1, ɵ35 = () => addRowAfter$1, ɵ36 = () => deleteRow$1, ɵ37 = () => deleteColumn$1, ɵ38 = () => mergeCells$1, ɵ39 = () => splitCell$1, ɵ40 = () => deleteTable$1;
1648
1649
  const tableCommand = {
1649
- insertTable: ɵ30,
1650
- addColumnBefore: ɵ31,
1651
- addColumnAfter: ɵ32,
1652
- addRowBefore: ɵ33,
1653
- addRowAfter: ɵ34,
1654
- deleteRow: ɵ35,
1655
- deleteColumn: ɵ36,
1656
- mergeCells: ɵ37,
1657
- splitCell: ɵ38,
1658
- deleteTable: ɵ39
1650
+ insertTable: ɵ31,
1651
+ addColumnBefore: ɵ32,
1652
+ addColumnAfter: ɵ33,
1653
+ addRowBefore: ɵ34,
1654
+ addRowAfter: ɵ35,
1655
+ deleteRow: ɵ36,
1656
+ deleteColumn: ɵ37,
1657
+ mergeCells: ɵ38,
1658
+ splitCell: ɵ39,
1659
+ deleteTable: ɵ40
1659
1660
  };
1660
1661
  /**
1661
1662
  * @hidden
@@ -1722,6 +1723,10 @@ const getToolbarState = (state, options) => ({
1722
1723
  selected: false,
1723
1724
  disabled: !redo(state)
1724
1725
  },
1726
+ selectAll: {
1727
+ selected: false,
1728
+ disabled: false
1729
+ },
1725
1730
  strikethrough: {
1726
1731
  selected: hasMark(state, strikethrough),
1727
1732
  disabled: false
@@ -1771,6 +1776,12 @@ const getToolbarState = (state, options) => ({
1771
1776
  selected: false,
1772
1777
  disabled: false
1773
1778
  },
1779
+ // print
1780
+ print: {
1781
+ selected: false,
1782
+ disabled: false
1783
+ },
1784
+ // table
1774
1785
  insertTable: {
1775
1786
  selected: false,
1776
1787
  disabled: false
@@ -1843,6 +1854,8 @@ const initialToolBarState = {
1843
1854
  //history
1844
1855
  redo: { selected: false, disabled: true },
1845
1856
  undo: { selected: false, disabled: true },
1857
+ // print
1858
+ print: { selected: false, disabled: false },
1846
1859
  //dialogs
1847
1860
  createLink: { selected: false, disabled: true },
1848
1861
  insertFile: { selected: false, disabled: true },
@@ -1858,7 +1871,9 @@ const initialToolBarState = {
1858
1871
  deleteColumn: { selected: false, disabled: true },
1859
1872
  mergeCells: { selected: false, disabled: true },
1860
1873
  splitCell: { selected: false, disabled: true },
1861
- deleteTable: { selected: false, disabled: true }
1874
+ deleteTable: { selected: false, disabled: true },
1875
+ // select all
1876
+ selectAll: { selected: false, disabled: false }
1862
1877
  };
1863
1878
  /**
1864
1879
  * @hidden
@@ -1891,6 +1906,8 @@ const disabledToolBarState = {
1891
1906
  //history
1892
1907
  redo: { selected: false, disabled: true },
1893
1908
  undo: { selected: false, disabled: true },
1909
+ // print
1910
+ print: { selected: false, disabled: true },
1894
1911
  //dialogs
1895
1912
  createLink: { selected: false, disabled: true },
1896
1913
  insertFile: { selected: false, disabled: true },
@@ -1906,7 +1923,9 @@ const disabledToolBarState = {
1906
1923
  deleteColumn: { selected: false, disabled: true },
1907
1924
  mergeCells: { selected: false, disabled: true },
1908
1925
  splitCell: { selected: false, disabled: true },
1909
- deleteTable: { selected: false, disabled: true }
1926
+ deleteTable: { selected: false, disabled: true },
1927
+ // select all
1928
+ selectAll: { selected: false, disabled: true }
1910
1929
  };
1911
1930
 
1912
1931
  /**
@@ -2376,6 +2395,78 @@ li.ProseMirror-selectednode:after {
2376
2395
  -ms-user-select: none;
2377
2396
  user-select: none;
2378
2397
  }
2398
+
2399
+ /* image resizing */
2400
+ .k-editor-resize-handles-wrapper {
2401
+ position: absolute;
2402
+ visibility: hidden;
2403
+ }
2404
+
2405
+ .k-editor-resize-handle {
2406
+ position: absolute;
2407
+ visibility: visible;
2408
+ background-color: #fff;
2409
+ border: 1px solid #000;
2410
+ z-index: 100;
2411
+ width: 5px;
2412
+ height: 5px;
2413
+ }
2414
+
2415
+ .k-editor-resize-handle.northwest {
2416
+ top: 0;
2417
+ left: 0;
2418
+ transform: translate(-50%, -50%);
2419
+ cursor: nw-resize;
2420
+ }
2421
+
2422
+ .k-editor-resize-handle.north {
2423
+ top: 0;
2424
+ left: 50%;
2425
+ transform: translate(-50%, -50%);
2426
+ cursor: n-resize;
2427
+ }
2428
+
2429
+ .k-editor-resize-handle.northeast {
2430
+ top: 0;
2431
+ right: 0;
2432
+ transform: translate(50%, -50%);
2433
+ cursor: ne-resize;
2434
+ }
2435
+
2436
+ .k-editor-resize-handle.southwest {
2437
+ left: 0;
2438
+ bottom: 0;
2439
+ transform: translate(-50%, 50%);
2440
+ cursor: sw-resize;
2441
+ }
2442
+
2443
+ .k-editor-resize-handle.south {
2444
+ bottom: 0;
2445
+ left: 50%;
2446
+ transform: translate(-50%, 50%);
2447
+ cursor: s-resize;
2448
+ }
2449
+
2450
+ .k-editor-resize-handle.southeast {
2451
+ right: 0;
2452
+ bottom: 0;
2453
+ transform: translate(50%, 50%);
2454
+ cursor: se-resize;
2455
+ }
2456
+
2457
+ .k-editor-resize-handle.west {
2458
+ top: 50%;
2459
+ left: 0;
2460
+ transform: translate(-50%, -50%);
2461
+ cursor: w-resize;
2462
+ }
2463
+
2464
+ .k-editor-resize-handle.east {
2465
+ top: 50%;
2466
+ right: 0;
2467
+ transform: translate(50%, -50%);
2468
+ cursor: e-resize;
2469
+ }
2379
2470
  `;
2380
2471
  /**
2381
2472
  * @hidden
@@ -2452,7 +2543,8 @@ const EditorErrorMessages = {
2452
2543
  setSchemaOnce: 'The Schema cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/schema/',
2453
2544
  pluginsCallbackType: ɵ0$6,
2454
2545
  setPluginsOnce: 'The plugins cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/plugins/',
2455
- setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/'
2546
+ setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/',
2547
+ printTool: 'The Print tool and functionality are supported only in iframe mode. See https://www.telerik.com/kendo-angular-ui-develop/components/editor/api/EditorPrintButtonDirective/'
2456
2548
  };
2457
2549
 
2458
2550
  var EditorComponent_1;
@@ -2491,6 +2583,7 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
2491
2583
  /**
2492
2584
  * If set to `false`, the Editor will run in style non-encapsulated mode. This means
2493
2585
  * that the styles of the page will be persisted in the Editor and its content will be affected by them.
2586
+ * @default true
2494
2587
  */
2495
2588
  this.iframe = true;
2496
2589
  /**
@@ -2907,7 +3000,6 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
2907
3000
  * Manually focus the Editor.
2908
3001
  */
2909
3002
  focus() {
2910
- // this.focusChangedProgrammatically = true;
2911
3003
  this.focusChangedProgrammatically = true;
2912
3004
  this._view.focus();
2913
3005
  this.focusChangedProgrammatically = false;
@@ -3015,7 +3107,8 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
3015
3107
  keymap(buildListKeymap(currentSchema)),
3016
3108
  keymap(buildKeymap(currentSchema, { applyToWord: this.applyToWord })),
3017
3109
  keymap(baseKeymap),
3018
- gapCursor()
3110
+ gapCursor(),
3111
+ imageResizing()
3019
3112
  ];
3020
3113
  if (this.placeholder) {
3021
3114
  defaultPlugins.push(placeholder(this.placeholder));
@@ -3077,8 +3170,9 @@ let EditorComponent = EditorComponent_1 = class EditorComponent {
3077
3170
  if (this.readonly) {
3078
3171
  contentAreaClasslist.add('k-state-focused');
3079
3172
  }
3080
- if (!this.focusChangedProgrammatically) {
3173
+ if (!this.focusChangedProgrammatically || this.shouldEmitFocus) {
3081
3174
  this.ngZone.run(() => this.onFocus.emit());
3175
+ this.shouldEmitFocus = false;
3082
3176
  }
3083
3177
  }));
3084
3178
  this.subs.add(fromEvent(containerElement, 'focusout')
@@ -3393,8 +3487,12 @@ EditorComponent = EditorComponent_1 = __decorate([
3393
3487
  linkWebAddress="Web address"
3394
3488
  i18n-outdent="kendo.editor.outdent|The title of the tool that outdents the content."
3395
3489
  outdent="Outdent"
3490
+ i18n-print="kendo.editor.print|The title of the print tool."
3491
+ print="Print"
3396
3492
  i18n-redo="kendo.editor.redo|The title of the tool that undos the last action."
3397
3493
  redo="Redo"
3494
+ i18n-selectAll="kendo.editor.selectAll|The title of the tool that selects all content."
3495
+ selectAll="Select All"
3398
3496
  i18n-strikethrough="kendo.editor.strikethrough|The title of the tool that strikes through text."
3399
3497
  strikethrough="Strikethrough"
3400
3498
  i18n-subscript="kendo.editor.subscript|The title of the tool that makes text subscript."
@@ -4977,9 +5075,6 @@ let EditorInsertTableButtonComponent = EditorInsertTableButtonComponent_1 = clas
4977
5075
  this.toggle(false);
4978
5076
  }));
4979
5077
  }
4980
- ngAfterViewInit() {
4981
- this.getButton().tabIndex = -1;
4982
- }
4983
5078
  ngOnDestroy() {
4984
5079
  this.destroyPopup();
4985
5080
  if (this.subs) {
@@ -5022,7 +5117,7 @@ let EditorInsertTableButtonComponent = EditorInsertTableButtonComponent_1 = clas
5022
5117
  * @hidden
5023
5118
  */
5024
5119
  onBlur() {
5025
- this.getButton().tabIndex = -1;
5120
+ this.tabIndex = -1;
5026
5121
  this.buttonBlurred.emit();
5027
5122
  }
5028
5123
  /**
@@ -5043,8 +5138,8 @@ let EditorInsertTableButtonComponent = EditorInsertTableButtonComponent_1 = clas
5043
5138
  * @hidden
5044
5139
  */
5045
5140
  focus() {
5141
+ this.tabIndex = 0;
5046
5142
  this.getButton().focus();
5047
- this.getButton().tabIndex = 0;
5048
5143
  }
5049
5144
  /**
5050
5145
  * @hidden
@@ -5053,7 +5148,7 @@ let EditorInsertTableButtonComponent = EditorInsertTableButtonComponent_1 = clas
5053
5148
  if (ev.keyCode === Keys.Space || ev.keyCode === Keys.Enter) {
5054
5149
  return true;
5055
5150
  }
5056
- this.getButton().tabIndex = -1;
5151
+ this.tabIndex = -1;
5057
5152
  return false;
5058
5153
  }
5059
5154
  /**
@@ -5096,7 +5191,7 @@ __decorate([
5096
5191
  __metadata("design:type", TemplateRef)
5097
5192
  ], EditorInsertTableButtonComponent.prototype, "toolbarTemplate", void 0);
5098
5193
  __decorate([
5099
- ViewChild('popupTemplate', { static: true }),
5194
+ ViewChild('popupTemplate', { static: false }),
5100
5195
  __metadata("design:type", TemplateRef)
5101
5196
  ], EditorInsertTableButtonComponent.prototype, "popupTemplate", void 0);
5102
5197
  __decorate([
@@ -5123,6 +5218,7 @@ EditorInsertTableButtonComponent = EditorInsertTableButtonComponent_1 = __decora
5123
5218
  kendoButton
5124
5219
  #element
5125
5220
  [attr.title]="title"
5221
+ [attr.tabindex]="tabIndex"
5126
5222
  [icon]="'table-insert'"
5127
5223
  [disabled]="disabled"
5128
5224
  (click)="toggle()"
@@ -5130,7 +5226,14 @@ EditorInsertTableButtonComponent = EditorInsertTableButtonComponent_1 = __decora
5130
5226
  ></button>
5131
5227
  </ng-template>
5132
5228
  <ng-template #popupTemplate>
5133
- <button kendoButton #overflowElement [attr.title]="title" [icon]="'table-insert'" [disabled]="disabled" (click)="openDialog()">
5229
+ <button
5230
+ kendoButton
5231
+ #overflowElement
5232
+ [attr.title]="title"
5233
+ [attr.tabindex]="tabIndex"
5234
+ [icon]="'table-insert'"
5235
+ [disabled]="disabled"
5236
+ (click)="openDialog()">
5134
5237
  {{ title }}
5135
5238
  </button>
5136
5239
  </ng-template>
@@ -5226,9 +5329,11 @@ const commandIcons = {
5226
5329
  alignJustify: 'align-justify',
5227
5330
  alignLeft: 'align-left',
5228
5331
  alignRight: 'align-right',
5332
+ backColor: 'background',
5229
5333
  bold: 'bold',
5230
5334
  cleanFormatting: 'clear-css',
5231
5335
  createLink: 'link-horizontal',
5336
+ foreColor: 'foreground-color',
5232
5337
  indent: 'indent-increase',
5233
5338
  insertFile: 'file-add',
5234
5339
  insertImage: 'image',
@@ -5236,7 +5341,9 @@ const commandIcons = {
5236
5341
  insertUnorderedList: 'list-unordered',
5237
5342
  italic: 'italic',
5238
5343
  outdent: 'indent-decrease',
5344
+ print: 'print',
5239
5345
  redo: 'redo',
5346
+ selectAll: 'select-all',
5240
5347
  strikethrough: 'strikethrough',
5241
5348
  subscript: 'sub-script',
5242
5349
  superscript: 'sup-script',
@@ -5244,8 +5351,6 @@ const commandIcons = {
5244
5351
  undo: 'undo',
5245
5352
  unlink: 'unlink-horizontal',
5246
5353
  viewSource: 'html',
5247
- foreColor: 'foreground-color',
5248
- backColor: 'background',
5249
5354
  //table
5250
5355
  insertTable: 'table-insert',
5251
5356
  addColumnBefore: 'table-column-insert-left',
@@ -5269,24 +5374,24 @@ class EditorCommandBase {
5269
5374
  this.button = button;
5270
5375
  this.editor = editor;
5271
5376
  this.localization = localization;
5272
- }
5273
- ngOnInit() {
5274
- this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
5275
- this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
5276
- this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
5277
- Promise.resolve(null).then(() => {
5377
+ setTimeout(() => {
5278
5378
  const text = this.localization.get(this.command);
5279
5379
  if (text) {
5280
- this.button.showText = "overflow";
5281
- this.button.showIcon = "both";
5380
+ this.button.showText = 'overflow';
5381
+ this.button.showIcon = 'both';
5282
5382
  this.button.text = text;
5283
5383
  }
5284
- if (!this.button.icon) {
5384
+ if (!this.button.toolbarOptions.icon) {
5285
5385
  this.button.icon = commandIcons[this.command];
5286
5386
  }
5287
5387
  this.button.title = text;
5288
5388
  });
5289
5389
  }
5390
+ ngOnInit() {
5391
+ this.subs = this.editor.stateChange.subscribe(this.onStateChange.bind(this));
5392
+ this.subs.add(this.button.click.subscribe((this.clickHandler.bind(this))));
5393
+ this.subs.add(this.button.pointerdown.subscribe((this.pointerdownHandler.bind(this))));
5394
+ }
5290
5395
  ngOnDestroy() {
5291
5396
  if (this.subs) {
5292
5397
  this.subs.unsubscribe();
@@ -6416,10 +6521,18 @@ __decorate([
6416
6521
  Input(),
6417
6522
  __metadata("design:type", String)
6418
6523
  ], Messages.prototype, "outdent", void 0);
6524
+ __decorate([
6525
+ Input(),
6526
+ __metadata("design:type", String)
6527
+ ], Messages.prototype, "print", void 0);
6419
6528
  __decorate([
6420
6529
  Input(),
6421
6530
  __metadata("design:type", String)
6422
6531
  ], Messages.prototype, "redo", void 0);
6532
+ __decorate([
6533
+ Input(),
6534
+ __metadata("design:type", String)
6535
+ ], Messages.prototype, "selectAll", void 0);
6423
6536
  __decorate([
6424
6537
  Input(),
6425
6538
  __metadata("design:type", String)
@@ -6620,6 +6733,95 @@ DropDownToolDirective = __decorate([
6620
6733
  NgZone])
6621
6734
  ], DropDownToolDirective);
6622
6735
 
6736
+ /**
6737
+ * A directive which configures an existing `ToolBarButtonComponent` as an Editor Print tool
6738
+ * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
6739
+ * The directive will predefine the `icon` and `click` event handlers of the button.
6740
+ *
6741
+ * > The Editor Print tool is supported in the default [`iframe`](https://www.telerik.com/kendo-angular-ui-develop/components/editor/api/EditorComponent/#toc-iframe) mode only.
6742
+ *
6743
+ * @example
6744
+ * ```ts-no-run
6745
+ * <kendo-toolbar-button kendoEditorPrintButton></kendo-toolbar-button>
6746
+ * ```
6747
+ *
6748
+ * The following example demonstrates how to change the default icon that is applied by the directive.
6749
+ *
6750
+ * @example
6751
+ * ```ts-no-run
6752
+ * <kendo-toolbar-button kendoEditorPrintButton icon="blogger"></kendo-toolbar-button>
6753
+ * ```
6754
+ */
6755
+ let EditorPrintDirective = class EditorPrintDirective extends EditorCommandButton {
6756
+ constructor(button, editor, localization) {
6757
+ super('print', button, editor, localization);
6758
+ this.editor = editor;
6759
+ }
6760
+ ngAfterViewInit() {
6761
+ if (isDevMode) {
6762
+ if (!this.editor.iframe) {
6763
+ throw new Error(EditorErrorMessages.printTool);
6764
+ }
6765
+ }
6766
+ }
6767
+ clickHandler() {
6768
+ if (this.editor.iframe) {
6769
+ const view = this.editor.view;
6770
+ const dom = view && view.dom;
6771
+ const doc = dom && dom.ownerDocument;
6772
+ const editorWindow = doc && doc.defaultView;
6773
+ if (editorWindow) {
6774
+ editorWindow.print();
6775
+ }
6776
+ }
6777
+ }
6778
+ };
6779
+ EditorPrintDirective = __decorate([
6780
+ Directive({
6781
+ selector: 'kendo-toolbar-button[kendoEditorPrintButton]'
6782
+ }),
6783
+ __param(1, Host()),
6784
+ __metadata("design:paramtypes", [ToolBarButtonComponent,
6785
+ EditorComponent,
6786
+ EditorLocalizationService])
6787
+ ], EditorPrintDirective);
6788
+
6789
+ /**
6790
+ * A directive which configures an existing `ToolBarButtonComponent` as an Editor SelectAll tool
6791
+ * ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
6792
+ * The directive will predefine the `icon` and `click` event handlers of the button.
6793
+ *
6794
+ * @example
6795
+ * ```ts-no-run
6796
+ * <kendo-toolbar-button kendoEditorSelectAllButton></kendo-toolbar-button>
6797
+ * ```
6798
+ *
6799
+ * The following example demonstrates how to change the default icon that is applied by the directive.
6800
+ *
6801
+ * @example
6802
+ * ```ts-no-run
6803
+ * <kendo-toolbar-button kendoEditorSelectAllButton icon="blogger"></kendo-toolbar-button>
6804
+ * ```
6805
+ */
6806
+ let EditorSelectAllButtonDirective = class EditorSelectAllButtonDirective extends EditorCommandButton {
6807
+ constructor(button, editor, localization) {
6808
+ super('selectAll', button, editor, localization);
6809
+ }
6810
+ clickHandler() {
6811
+ this.editor.shouldEmitFocus = true;
6812
+ super.clickHandler();
6813
+ }
6814
+ };
6815
+ EditorSelectAllButtonDirective = __decorate([
6816
+ Directive({
6817
+ selector: 'kendo-toolbar-button[kendoEditorSelectAllButton]'
6818
+ }),
6819
+ __param(1, Host()),
6820
+ __metadata("design:paramtypes", [ToolBarButtonComponent,
6821
+ EditorComponent,
6822
+ EditorLocalizationService])
6823
+ ], EditorSelectAllButtonDirective);
6824
+
6623
6825
  const COMPONENT_DIRECTIVES = [
6624
6826
  //alignment
6625
6827
  EditorAlignLeftButtonDirective,
@@ -6671,7 +6873,11 @@ const COMPONENT_DIRECTIVES = [
6671
6873
  CustomMessagesComponent,
6672
6874
  LocalizedMessagesDirective,
6673
6875
  // dropdown tools
6674
- DropDownToolDirective
6876
+ DropDownToolDirective,
6877
+ // print
6878
+ EditorPrintDirective,
6879
+ // select all
6880
+ EditorSelectAllButtonDirective
6675
6881
  ];
6676
6882
  const TOOLBAR_TOOLS = [
6677
6883
  EditorFontSizeComponent,
@@ -6785,4 +6991,4 @@ EditorModule = __decorate([
6785
6991
  * Generated bundle index. Do not edit.
6786
6992
  */
6787
6993
 
6788
- export { ColorPickerDialogComponent, FileLinkDialogComponent, FontFamilyDialogComponent, FontSizeDialogComponent, FormatDialogComponent, ImageDialogComponent, InsertTableDialogComponent, SourceDialogComponent, CustomMessagesComponent, EditorLocalizationService, LocalizedMessagesDirective, Messages, EditorAlignCenterButtonDirective, EditorAlignJustifyButtonDirective, EditorAlignLeftButtonDirective, EditorAlignRightButtonDirective, EditorBackColorDirective, EditorColorPickerComponent, EditorForeColorDirective, EditorCleanFormattingButtonDirective, FontFamilyDropDownListComponent, EditorFontFamilyComponent, FontSizeDropDownListComponent, EditorFontSizeComponent, FormatDropDownListComponent, EditorFormatComponent, EditorRedoButtonDirective, EditorUndoButtonDirective, EditorInsertImageButtonDirective, EditorIndentButtonDirective, EditorOutdentButtonDirective, EditorCreateLinkButtonDirective, EditorInsertFileButtonDirective, EditorUnlinkButtonDirective, EditorInsertOrderedListButtonDirective, EditorInsertUnorderedListButtonDirective, DropDownToolDirective, EditorCommandBase, EditorCommandButton, EditorCommandDialog, EditorViewSourceButtonDirective, EditorAddColumnAfterButtonDirective, EditorAddColumnBeforeButtonDirective, EditorAddRowAfterButtonDirective, EditorAddRowBeforeButtonDirective, EditorDeleteColumnButtonDirective, EditorDeleteRowButtonDirective, EditorDeleteTableButtonDirective, EditorInsertTableButtonComponent, EditorMergeCellsButtonDirective, EditorSplitCellButtonDirective, PopupTableGridComponent, EditorBoldButtonDirective, EditorItalicButtonDirective, EditorStrikethroughButtonDirective, EditorSubscriptButtonDirective, EditorSuperscriptButtonDirective, EditorUnderlineButtonDirective, EditorComponent, EditorModule, schema };
6994
+ export { ColorPickerDialogComponent, FileLinkDialogComponent, FontFamilyDialogComponent, FontSizeDialogComponent, FormatDialogComponent, ImageDialogComponent, InsertTableDialogComponent, SourceDialogComponent, CustomMessagesComponent, EditorLocalizationService, LocalizedMessagesDirective, Messages, EditorAlignCenterButtonDirective, EditorAlignJustifyButtonDirective, EditorAlignLeftButtonDirective, EditorAlignRightButtonDirective, EditorBackColorDirective, EditorColorPickerComponent, EditorForeColorDirective, EditorCleanFormattingButtonDirective, FontFamilyDropDownListComponent, EditorFontFamilyComponent, FontSizeDropDownListComponent, EditorFontSizeComponent, FormatDropDownListComponent, EditorFormatComponent, EditorRedoButtonDirective, EditorUndoButtonDirective, EditorInsertImageButtonDirective, EditorIndentButtonDirective, EditorOutdentButtonDirective, EditorCreateLinkButtonDirective, EditorInsertFileButtonDirective, EditorUnlinkButtonDirective, EditorInsertOrderedListButtonDirective, EditorInsertUnorderedListButtonDirective, EditorPrintDirective, EditorSelectAllButtonDirective, DropDownToolDirective, EditorCommandBase, EditorCommandButton, EditorCommandDialog, EditorViewSourceButtonDirective, EditorAddColumnAfterButtonDirective, EditorAddColumnBeforeButtonDirective, EditorAddRowAfterButtonDirective, EditorAddRowBeforeButtonDirective, EditorDeleteColumnButtonDirective, EditorDeleteRowButtonDirective, EditorDeleteTableButtonDirective, EditorInsertTableButtonComponent, EditorMergeCellsButtonDirective, EditorSplitCellButtonDirective, PopupTableGridComponent, EditorBoldButtonDirective, EditorItalicButtonDirective, EditorStrikethroughButtonDirective, EditorSubscriptButtonDirective, EditorSuperscriptButtonDirective, EditorUnderlineButtonDirective, EditorComponent, EditorModule, schema };