@syncfusion/ej2-richtexteditor 20.4.52 → 21.1.35

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 (140) hide show
  1. package/CHANGELOG.md +32 -2
  2. package/dist/ej2-richtexteditor.min.js +2 -2
  3. package/dist/ej2-richtexteditor.umd.min.js +2 -2
  4. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-richtexteditor.es2015.js +1623 -639
  6. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-richtexteditor.es5.js +1638 -646
  8. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  9. package/dist/global/ej2-richtexteditor.min.js +2 -2
  10. package/dist/global/ej2-richtexteditor.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +13 -13
  13. package/src/common/config.js +3 -1
  14. package/src/common/constant.d.ts +6 -0
  15. package/src/common/constant.js +6 -0
  16. package/src/common/util.d.ts +2 -1
  17. package/src/common/util.js +15 -6
  18. package/src/editor-manager/base/editor-manager.d.ts +2 -0
  19. package/src/editor-manager/base/editor-manager.js +6 -1
  20. package/src/editor-manager/base/enum.d.ts +14 -0
  21. package/src/editor-manager/base/interface.d.ts +34 -0
  22. package/src/editor-manager/plugin/clearformat.js +13 -4
  23. package/src/editor-manager/plugin/format-painter-actions.d.ts +63 -0
  24. package/src/editor-manager/plugin/format-painter-actions.js +474 -0
  25. package/src/editor-manager/plugin/image.js +0 -1
  26. package/src/editor-manager/plugin/inserthtml-exec.js +1 -1
  27. package/src/editor-manager/plugin/inserthtml.d.ts +1 -1
  28. package/src/editor-manager/plugin/inserthtml.js +18 -10
  29. package/src/editor-manager/plugin/isformatted.js +1 -0
  30. package/src/editor-manager/plugin/link.js +0 -1
  31. package/src/editor-manager/plugin/lists.js +1 -1
  32. package/src/editor-manager/plugin/ms-word-clean-up.js +57 -19
  33. package/src/editor-manager/plugin/selection-commands.d.ts +4 -1
  34. package/src/editor-manager/plugin/selection-commands.js +70 -9
  35. package/src/editor-manager/plugin/video.js +2 -0
  36. package/src/editor-manager/plugin.d.ts +1 -0
  37. package/src/editor-manager/plugin.js +1 -0
  38. package/src/global.js +1 -1
  39. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +1 -0
  40. package/src/rich-text-editor/actions/base-quick-toolbar.js +21 -1
  41. package/src/rich-text-editor/actions/base-toolbar.js +33 -10
  42. package/src/rich-text-editor/actions/enter-key.js +23 -16
  43. package/src/rich-text-editor/actions/format-painter.d.ts +24 -0
  44. package/src/rich-text-editor/actions/format-painter.js +142 -0
  45. package/src/rich-text-editor/actions/full-screen.js +0 -1
  46. package/src/rich-text-editor/actions/html-editor.d.ts +1 -0
  47. package/src/rich-text-editor/actions/html-editor.js +117 -97
  48. package/src/rich-text-editor/actions/paste-clean-up.js +2 -2
  49. package/src/rich-text-editor/actions/quick-toolbar.js +8 -1
  50. package/src/rich-text-editor/actions/toolbar.js +10 -0
  51. package/src/rich-text-editor/actions.d.ts +1 -0
  52. package/src/rich-text-editor/actions.js +1 -0
  53. package/src/rich-text-editor/base/constant.d.ts +10 -0
  54. package/src/rich-text-editor/base/constant.js +10 -0
  55. package/src/rich-text-editor/base/enum.d.ts +4 -0
  56. package/src/rich-text-editor/base/interface.d.ts +30 -3
  57. package/src/rich-text-editor/base/interface.js +12 -0
  58. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +30 -4
  59. package/src/rich-text-editor/base/rich-text-editor.d.ts +35 -5
  60. package/src/rich-text-editor/base/rich-text-editor.js +46 -10
  61. package/src/rich-text-editor/base/util.js +2 -0
  62. package/src/rich-text-editor/formatter/formatter.js +22 -13
  63. package/src/rich-text-editor/formatter/html-formatter.d.ts +5 -3
  64. package/src/rich-text-editor/formatter/html-formatter.js +7 -5
  65. package/src/rich-text-editor/models/default-locale.js +4 -2
  66. package/src/rich-text-editor/models/items.d.ts +3 -0
  67. package/src/rich-text-editor/models/items.js +32 -0
  68. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +29 -1
  69. package/src/rich-text-editor/models/toolbar-settings.d.ts +24 -1
  70. package/src/rich-text-editor/models/toolbar-settings.js +20 -0
  71. package/src/rich-text-editor/renderer/audio-module.js +6 -3
  72. package/src/rich-text-editor/renderer/image-module.js +11 -6
  73. package/src/rich-text-editor/renderer/link-module.js +2 -1
  74. package/src/rich-text-editor/renderer/table-module.js +18 -6
  75. package/src/rich-text-editor/renderer/toolbar-renderer.js +10 -1
  76. package/src/rich-text-editor/renderer/video-module.js +8 -5
  77. package/src/rich-text-editor/renderer/view-source.js +1 -1
  78. package/styles/bootstrap-dark.css +31 -1
  79. package/styles/bootstrap.css +31 -1
  80. package/styles/bootstrap4.css +31 -1
  81. package/styles/bootstrap5-dark.css +32 -2
  82. package/styles/bootstrap5.css +32 -2
  83. package/styles/fabric-dark.css +31 -1
  84. package/styles/fabric.css +31 -1
  85. package/styles/fluent-dark.css +34 -4
  86. package/styles/fluent.css +34 -4
  87. package/styles/highcontrast-light.css +31 -1
  88. package/styles/highcontrast.css +31 -1
  89. package/styles/material-dark.css +31 -1
  90. package/styles/material.css +31 -1
  91. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +25 -1
  92. package/styles/rich-text-editor/_bootstrap-definition.scss +25 -1
  93. package/styles/rich-text-editor/_bootstrap4-definition.scss +25 -1
  94. package/styles/rich-text-editor/_bootstrap5-definition.scss +28 -5
  95. package/styles/rich-text-editor/_fabric-dark-definition.scss +25 -1
  96. package/styles/rich-text-editor/_fabric-definition.scss +25 -1
  97. package/styles/rich-text-editor/_fluent-definition.scss +30 -7
  98. package/styles/rich-text-editor/_fusionnew-definition.scss +26 -3
  99. package/styles/rich-text-editor/_highcontrast-definition.scss +25 -1
  100. package/styles/rich-text-editor/_highcontrast-light-definition.scss +25 -1
  101. package/styles/rich-text-editor/_layout.scss +47 -15
  102. package/styles/rich-text-editor/_material-dark-definition.scss +26 -1
  103. package/styles/rich-text-editor/_material-definition.scss +25 -1
  104. package/styles/rich-text-editor/_tailwind-definition.scss +28 -5
  105. package/styles/rich-text-editor/_theme.scss +54 -6
  106. package/styles/rich-text-editor/bootstrap-dark.css +31 -1
  107. package/styles/rich-text-editor/bootstrap.css +31 -1
  108. package/styles/rich-text-editor/bootstrap4.css +31 -1
  109. package/styles/rich-text-editor/bootstrap5-dark.css +32 -2
  110. package/styles/rich-text-editor/bootstrap5.css +32 -2
  111. package/styles/rich-text-editor/fabric-dark.css +31 -1
  112. package/styles/rich-text-editor/fabric.css +31 -1
  113. package/styles/rich-text-editor/fluent-dark.css +34 -4
  114. package/styles/rich-text-editor/fluent.css +34 -4
  115. package/styles/rich-text-editor/highcontrast-light.css +31 -1
  116. package/styles/rich-text-editor/highcontrast.css +31 -1
  117. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +8 -0
  118. package/styles/rich-text-editor/icons/_bootstrap.scss +8 -0
  119. package/styles/rich-text-editor/icons/_bootstrap4.scss +8 -0
  120. package/styles/rich-text-editor/icons/_bootstrap5.scss +8 -0
  121. package/styles/rich-text-editor/icons/_fabric-dark.scss +8 -0
  122. package/styles/rich-text-editor/icons/_fabric.scss +8 -0
  123. package/styles/rich-text-editor/icons/_fluent.scss +8 -0
  124. package/styles/rich-text-editor/icons/_fusionnew.scss +8 -0
  125. package/styles/rich-text-editor/icons/_highcontrast-light.scss +8 -0
  126. package/styles/rich-text-editor/icons/_highcontrast.scss +8 -0
  127. package/styles/rich-text-editor/icons/_material-dark.scss +8 -0
  128. package/styles/rich-text-editor/icons/_material.scss +8 -0
  129. package/styles/rich-text-editor/icons/_material3.scss +8 -0
  130. package/styles/rich-text-editor/icons/_tailwind.scss +8 -0
  131. package/styles/rich-text-editor/material-dark.css +31 -1
  132. package/styles/rich-text-editor/material.css +31 -1
  133. package/styles/rich-text-editor/tailwind-dark.css +31 -1
  134. package/styles/rich-text-editor/tailwind.css +31 -1
  135. package/styles/tailwind-dark.css +31 -1
  136. package/styles/tailwind.css +31 -1
  137. package/GitLeaksReport.json +0 -1
  138. package/gitleaks-ci/gitleaks +0 -0
  139. package/gitleaks-ci.tar.gz +0 -0
  140. package/styles/rich-text-editor/_material3-definition.scss +0 -196
@@ -173,5 +173,17 @@ export var executeGroup = {
173
173
  'removeFormat': {
174
174
  command: 'Clear',
175
175
  subCommand: 'ClearFormat'
176
+ },
177
+ 'copyFormatPainter': {
178
+ command: 'FormatPainter',
179
+ value: 'format-copy'
180
+ },
181
+ 'applyFormatPainter': {
182
+ command: 'FormatPainter',
183
+ value: 'format-paste'
184
+ },
185
+ 'escapeFormatPainter': {
186
+ command: 'FormatPainter',
187
+ value: 'escape'
176
188
  }
177
189
  };
@@ -1,4 +1,4 @@
1
- import { Component, ModuleDeclaration, EventHandler, Complex, Browser, EmitType, addClass, select, detach } from '@syncfusion/ej2-base';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, formatUnit, L10n, closest } from '@syncfusion/ej2-base';import { setStyleAttribute, Event, removeClass, print as printWindow, attributes } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, compile, append, extend, debounce } from '@syncfusion/ej2-base';import { Touch as EJ2Touch, TapEventArgs } from '@syncfusion/ej2-base';import { getScrollableParent, BeforeOpenEventArgs, BeforeCloseEventArgs } from '@syncfusion/ej2-popups';import * as events from '../base/constant';import * as classes from '../base/classes';import { Render } from '../renderer/render';import { ViewSource } from '../renderer/view-source';import { IRenderer, IFormatter, PrintEventArgs, ActionCompleteEventArgs, ActionBeginEventArgs, ImageDropEventArgs } from './interface';import { IExecutionGroup, executeGroup, CommandName, ResizeArgs, StatusArgs, ToolbarStatusEventArgs } from './interface';import { BeforeQuickToolbarOpenArgs, ChangeEventArgs, AfterImageDeleteEventArgs, AfterMediaDeleteEventArgs, PasteCleanupArgs } from './interface';import { ILinkCommandsArgs, IImageCommandsArgs, IAudioCommandsArgs, IVideoCommandsArgs, BeforeSanitizeHtmlArgs, ITableCommandsArgs, ExecuteCommandOption } from './interface';import { ServiceLocator } from '../services/service-locator';import { RendererFactory } from '../services/renderer-factory';import { RenderType, ToolbarType, DialogType } from './enum';import { EditorMode, ShiftEnterKey, EnterKey } from './../../common/types';import { Toolbar } from '../actions/toolbar';import { ExecCommandCallBack } from '../actions/execute-command-callback';import { KeyboardEvents, KeyboardEventArgs } from '../actions/keyboard';import { FontFamilyModel, FontSizeModel, FontColorModel, FormatModel, BackgroundColorModel, NumberFormatListModel, BulletFormatListModel } from '../models/models';import { ToolbarSettingsModel, IFrameSettingsModel, ImageSettingsModel, AudioSettingsModel, VideoSettingsModel, TableSettingsModel } from '../models/models';import { QuickToolbarSettingsModel, InlineModeModel, PasteCleanupSettingsModel, FileManagerSettingsModel } from '../models/models';import { ToolbarSettings, ImageSettings, AudioSettings, VideoSettings, QuickToolbarSettings, FontFamily, FontSize, Format, NumberFormatList, BulletFormatList } from '../models/toolbar-settings';import { FileManagerSettings } from '../models/toolbar-settings';import { TableSettings, PasteCleanupSettings } from '../models/toolbar-settings';import { FontColor, BackgroundColor } from '../models/toolbar-settings';import { IFrameSettings } from '../models/iframe-settings';import { InlineMode } from '../models/inline-mode';import { Link } from '../renderer/link-module';import { Image } from '../renderer/image-module';import { Audio } from '../renderer/audio-module';import { Video } from '../renderer/video-module';import { Table } from '../renderer/table-module';import { Count } from '../actions/count';import { HtmlEditor } from '../actions/html-editor';import { MarkdownEditor } from '../actions/markdown-editor';import { defaultLocale } from '../models/default-locale';import { setAttributes } from '../actions/html-attributes';import { BaseToolbar } from '../actions/base-toolbar';import { QuickToolbar } from '../actions/quick-toolbar';import { FullScreen } from '../actions/full-screen';import { PasteCleanup } from '../actions/paste-clean-up';import { EnterKeyAction } from '../actions/enter-key';import * as CONSTANT from '../../common/constant';import { IHtmlKeyboardEvent } from '../../editor-manager/base/interface';import { dispatchEvent, getEditValue, isIDevice, decode, isEditableValueEmpty, getDefaultValue } from '../base/util';import { DialogRenderer } from '../renderer/dialog-renderer';import { SelectedEventArgs, RemovingEventArgs, UploadingEventArgs, BeforeUploadEventArgs } from '@syncfusion/ej2-inputs';import { Resize } from '../actions/resize';import { FileManager } from '../actions/file-manager';import { EditorManager } from '../../editor-manager';
1
+ import { Component, ModuleDeclaration, EventHandler, Complex, Browser, EmitType, addClass, select, detach } from '@syncfusion/ej2-base';import { Property, NotifyPropertyChanges, INotifyPropertyChanged, formatUnit, L10n, closest } from '@syncfusion/ej2-base';import { setStyleAttribute, Event, removeClass, print as printWindow, attributes } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, compile, append, extend, debounce } from '@syncfusion/ej2-base';import { Touch as EJ2Touch, TapEventArgs } from '@syncfusion/ej2-base';import { getScrollableParent, BeforeOpenEventArgs, BeforeCloseEventArgs } from '@syncfusion/ej2-popups';import * as events from '../base/constant';import * as classes from '../base/classes';import { Render } from '../renderer/render';import { ViewSource } from '../renderer/view-source';import { IRenderer, IFormatter, PrintEventArgs, ActionCompleteEventArgs, ActionBeginEventArgs, ImageDropEventArgs, IFormatPainterArgs } from './interface';import { IExecutionGroup, executeGroup, CommandName, ResizeArgs, StatusArgs, ToolbarStatusEventArgs } from './interface';import { BeforeQuickToolbarOpenArgs, ChangeEventArgs, AfterImageDeleteEventArgs, AfterMediaDeleteEventArgs, PasteCleanupArgs } from './interface';import { ILinkCommandsArgs, IImageCommandsArgs, IAudioCommandsArgs, IVideoCommandsArgs, BeforeSanitizeHtmlArgs, ITableCommandsArgs, ExecuteCommandOption } from './interface';import { ServiceLocator } from '../services/service-locator';import { RendererFactory } from '../services/renderer-factory';import { RenderType, ToolbarType, DialogType } from './enum';import { EditorMode, ShiftEnterKey, EnterKey } from './../../common/types';import { Toolbar } from '../actions/toolbar';import { ExecCommandCallBack } from '../actions/execute-command-callback';import { KeyboardEvents, KeyboardEventArgs } from '../actions/keyboard';import { FontFamilyModel, FontSizeModel, FontColorModel, FormatModel, BackgroundColorModel, NumberFormatListModel, BulletFormatListModel } from '../models/models';import { ToolbarSettingsModel, IFrameSettingsModel, ImageSettingsModel, AudioSettingsModel, VideoSettingsModel, TableSettingsModel } from '../models/models';import { QuickToolbarSettingsModel, InlineModeModel, PasteCleanupSettingsModel, FileManagerSettingsModel , FormatPainterSettingsModel} from '../models/models';import { ToolbarSettings, ImageSettings, AudioSettings, VideoSettings, QuickToolbarSettings, FontFamily, FontSize, Format, NumberFormatList, BulletFormatList, FormatPainterSettings } from '../models/toolbar-settings';import { FileManagerSettings } from '../models/toolbar-settings';import { TableSettings, PasteCleanupSettings } from '../models/toolbar-settings';import { FontColor, BackgroundColor } from '../models/toolbar-settings';import { IFrameSettings } from '../models/iframe-settings';import { InlineMode } from '../models/inline-mode';import { Link } from '../renderer/link-module';import { Image } from '../renderer/image-module';import { Audio } from '../renderer/audio-module';import { Video } from '../renderer/video-module';import { Table } from '../renderer/table-module';import { Count } from '../actions/count';import { HtmlEditor } from '../actions/html-editor';import { MarkdownEditor } from '../actions/markdown-editor';import { defaultLocale } from '../models/default-locale';import { setAttributes } from '../actions/html-attributes';import { BaseToolbar } from '../actions/base-toolbar';import { QuickToolbar } from '../actions/quick-toolbar';import { FullScreen } from '../actions/full-screen';import { PasteCleanup } from '../actions/paste-clean-up';import { EnterKeyAction } from '../actions/enter-key';import * as CONSTANT from '../../common/constant';import { IHtmlKeyboardEvent } from '../../editor-manager/base/interface';import { dispatchEvent, getEditValue, isIDevice, decode, isEditableValueEmpty, getDefaultValue } from '../base/util';import { DialogRenderer } from '../renderer/dialog-renderer';import { SelectedEventArgs, RemovingEventArgs, UploadingEventArgs, BeforeUploadEventArgs } from '@syncfusion/ej2-inputs';import { Resize } from '../actions/resize';import { FileManager } from '../actions/file-manager';import { EditorManager } from '../../editor-manager';import { FormatPainter } from '../actions/format-painter';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -92,13 +92,32 @@ export interface RichTextEditorModel extends ComponentModel{
92
92
  */
93
93
  pasteCleanupSettings?: PasteCleanupSettingsModel;
94
94
 
95
+ /**
96
+ * Specifies the format painter options in Rich Text Editor with the following properties.
97
+ * * allowedContext - Sets the context or contexts in which styles will be copied.
98
+ * * allowedFormats - Sets the tag name selectors for elements from which the formats can be copied.
99
+ * * deniedFormats - Sets the selectors for elements from which formats cannot be copied.
100
+ *
101
+ * {% codeBlock src='rich-text-editor/format-painter-settings/index.md' %}{% endcodeBlock %}
102
+ *
103
+ * @default
104
+ * {
105
+ * allowedContext: ['Text', 'List', 'Table'],
106
+ * allowedFormats: 'b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; table; thead; tbody; tr; td; th; ol; ul; li; pre;',
107
+ * deniedFormats: null
108
+ * }
109
+ * @aspignore
110
+ * @private
111
+ */
112
+ formatPainterSettings?: FormatPainterSettingsModel
113
+
95
114
  /**
96
115
  * Specifies the items to be rendered in an iframe mode, and it has the following properties.
97
116
  * * enable - Set Boolean value to enable, the editors content is placed in an iframe and isolated from the rest of the page.
98
117
  * * attributes - Custom style to be used inside the iframe to display content. This style is added to the iframe body.
99
118
  * * resources - we can add both styles and scripts to the iframe.
100
- * 1. styles[] - An array of CSS style files to inject inside the iframe to display content.
101
- * 2. scripts[] - An array of JS script files to inject inside the iframe.
119
+ * 1. styles[] - An array of CSS style files to inject inside the iframe to display content
120
+ * 2. scripts[] - An array of JS script files to inject inside the iframe
102
121
  *
103
122
  * {% codeBlock src='rich-text-editor/iframe-settings/index.md' %}{% endcodeBlock %}
104
123
  *
@@ -287,6 +306,13 @@ export interface RichTextEditorModel extends ComponentModel{
287
306
  */
288
307
  enablePersistence?: boolean;
289
308
 
309
+ /**
310
+ * Specify the value whether tooltip will be displayed for the Rich Text Editor toolbar.
311
+ *
312
+ * @default false.
313
+ */
314
+ showTooltip?: boolean;
315
+
290
316
  /**
291
317
  * Enables or disables the resizing option in the editor.
292
318
  * If enabled, the Rich Text Editor can be resized by dragging the resize icon in the bottom right corner.
@@ -948,7 +974,7 @@ export interface RichTextEditorModel extends ComponentModel{
948
974
  *
949
975
  * @event 'afterPasteCleanup'
950
976
  */
951
- afterPasteCleanup?: EmitType<Object>;
977
+ afterPasteCleanup?: EmitType<object>;
952
978
 
953
979
  /**
954
980
  * Triggers before drop the image.
@@ -15,7 +15,7 @@ import { Toolbar } from '../actions/toolbar';
15
15
  import { KeyboardEvents } from '../actions/keyboard';
16
16
  import { FontFamilyModel, FontSizeModel, FontColorModel, FormatModel, BackgroundColorModel, NumberFormatListModel, BulletFormatListModel } from '../models/models';
17
17
  import { ToolbarSettingsModel, IFrameSettingsModel, ImageSettingsModel, AudioSettingsModel, VideoSettingsModel, TableSettingsModel } from '../models/models';
18
- import { QuickToolbarSettingsModel, InlineModeModel, PasteCleanupSettingsModel, FileManagerSettingsModel } from '../models/models';
18
+ import { QuickToolbarSettingsModel, InlineModeModel, PasteCleanupSettingsModel, FileManagerSettingsModel, FormatPainterSettingsModel } from '../models/models';
19
19
  import { Link } from '../renderer/link-module';
20
20
  import { Image } from '../renderer/image-module';
21
21
  import { Audio } from '../renderer/audio-module';
@@ -32,6 +32,7 @@ import { EnterKeyAction } from '../actions/enter-key';
32
32
  import { SelectedEventArgs, RemovingEventArgs, UploadingEventArgs, BeforeUploadEventArgs } from '@syncfusion/ej2-inputs';
33
33
  import { Resize } from '../actions/resize';
34
34
  import { FileManager } from '../actions/file-manager';
35
+ import { FormatPainter } from '../actions/format-painter';
35
36
  /**
36
37
  * Represents the Rich Text Editor component.
37
38
  * ```html
@@ -178,6 +179,11 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
178
179
 
179
180
  */
180
181
  fileManagerModule: FileManager;
182
+ /**
183
+ * @hidden
184
+
185
+ */
186
+ formatPainterModule: FormatPainter;
181
187
  needsID: boolean;
182
188
  /**
183
189
  * Specifies the group of items aligned horizontally in the toolbar as well as defined the toolbar rendering type.
@@ -262,13 +268,31 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
262
268
  * }
263
269
  */
264
270
  pasteCleanupSettings: PasteCleanupSettingsModel;
271
+ /**
272
+ * Specifies the format painter options in Rich Text Editor with the following properties.
273
+ * * allowedContext - Sets the context or contexts in which styles will be copied.
274
+ * * allowedFormats - Sets the tag name selectors for elements from which the formats can be copied.
275
+ * * deniedFormats - Sets the selectors for elements from which formats cannot be copied.
276
+ *
277
+ * {% codeBlock src='rich-text-editor/format-painter-settings/index.md' %}{% endcodeBlock %}
278
+ *
279
+ * @default
280
+ * {
281
+ * allowedContext: ['Text', 'List', 'Table'],
282
+ * allowedFormats: 'b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; table; thead; tbody; tr; td; th; ol; ul; li; pre;',
283
+ * deniedFormats: null
284
+ * }
285
+ * @aspignore
286
+ * @private
287
+ */
288
+ formatPainterSettings: FormatPainterSettingsModel;
265
289
  /**
266
290
  * Specifies the items to be rendered in an iframe mode, and it has the following properties.
267
291
  * * enable - Set Boolean value to enable, the editors content is placed in an iframe and isolated from the rest of the page.
268
292
  * * attributes - Custom style to be used inside the iframe to display content. This style is added to the iframe body.
269
293
  * * resources - we can add both styles and scripts to the iframe.
270
- * 1. styles[] - An array of CSS style files to inject inside the iframe to display content.
271
- * 2. scripts[] - An array of JS script files to inject inside the iframe.
294
+ * 1. styles[] - An array of CSS style files to inject inside the iframe to display content
295
+ * 2. scripts[] - An array of JS script files to inject inside the iframe
272
296
  *
273
297
  * {% codeBlock src='rich-text-editor/iframe-settings/index.md' %}{% endcodeBlock %}
274
298
  *
@@ -447,6 +471,12 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
447
471
  * @default false.
448
472
  */
449
473
  enablePersistence: boolean;
474
+ /**
475
+ * Specify the value whether tooltip will be displayed for the Rich Text Editor toolbar.
476
+ *
477
+ * @default false.
478
+ */
479
+ showTooltip: boolean;
450
480
  /**
451
481
  * Enables or disables the resizing option in the editor.
452
482
  * If enabled, the Rich Text Editor can be resized by dragging the resize icon in the bottom right corner.
@@ -1044,7 +1074,7 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
1044
1074
  *
1045
1075
  * @event 'afterPasteCleanup'
1046
1076
  */
1047
- afterPasteCleanup: EmitType<Object>;
1077
+ afterPasteCleanup: EmitType<object>;
1048
1078
  /**
1049
1079
  * Triggers before drop the image.
1050
1080
  *
@@ -1151,7 +1181,7 @@ export declare class RichTextEditor extends Component<HTMLElement> implements IN
1151
1181
  * @param {ExecuteCommandOption} option - specifies the command option
1152
1182
  * @public
1153
1183
  */
1154
- executeCommand(commandName: CommandName, value?: string | HTMLElement | ILinkCommandsArgs | IImageCommandsArgs | ITableCommandsArgs, option?: ExecuteCommandOption): void;
1184
+ executeCommand(commandName: CommandName, value?: string | HTMLElement | ILinkCommandsArgs | IImageCommandsArgs | ITableCommandsArgs | FormatPainterSettingsModel, option?: ExecuteCommandOption): void;
1155
1185
  private htmlPurifier;
1156
1186
  private encode;
1157
1187
  /**
@@ -44,7 +44,7 @@ import { RendererFactory } from '../services/renderer-factory';
44
44
  import { RenderType, ToolbarType, DialogType } from './enum';
45
45
  import { ExecCommandCallBack } from '../actions/execute-command-callback';
46
46
  import { KeyboardEvents } from '../actions/keyboard';
47
- import { ToolbarSettings, ImageSettings, AudioSettings, VideoSettings, QuickToolbarSettings, FontFamily, FontSize, Format, NumberFormatList, BulletFormatList } from '../models/toolbar-settings';
47
+ import { ToolbarSettings, ImageSettings, AudioSettings, VideoSettings, QuickToolbarSettings, FontFamily, FontSize, Format, NumberFormatList, BulletFormatList, FormatPainterSettings } from '../models/toolbar-settings';
48
48
  import { FileManagerSettings } from '../models/toolbar-settings';
49
49
  import { TableSettings, PasteCleanupSettings } from '../models/toolbar-settings';
50
50
  import { FontColor, BackgroundColor } from '../models/toolbar-settings';
@@ -118,6 +118,10 @@ var RichTextEditor = /** @class */ (function (_super) {
118
118
  member: 'video',
119
119
  args: [this, this.serviceLocator]
120
120
  });
121
+ modules.push({
122
+ member: 'formatPainter',
123
+ args: [this]
124
+ });
121
125
  }
122
126
  if (this.fileManagerSettings.enable) {
123
127
  modules.push({ member: 'fileManager', args: [this, this.serviceLocator] });
@@ -187,7 +191,7 @@ var RichTextEditor = /** @class */ (function (_super) {
187
191
  this.setContainer();
188
192
  this.persistData();
189
193
  setStyleAttribute(this.element, { 'width': formatUnit(this.width) });
190
- attributes(this.element, { role: 'application' });
194
+ attributes(this.element, { role: 'application', 'aria-label': 'Rich Text Editor' });
191
195
  };
192
196
  RichTextEditor.prototype.persistData = function () {
193
197
  if (this.enablePersistence && this.originalElement.tagName === 'TEXTAREA') {
@@ -328,6 +332,7 @@ var RichTextEditor = /** @class */ (function (_super) {
328
332
  */
329
333
  RichTextEditor.prototype.executeCommand = function (commandName, value, option) {
330
334
  value = this.htmlPurifier(commandName, value);
335
+ var internalValue;
331
336
  if (this.editorMode === 'HTML') {
332
337
  var range = this.getRange();
333
338
  if (this.iframeSettings.enable) {
@@ -374,7 +379,16 @@ var RichTextEditor = /** @class */ (function (_super) {
374
379
  return;
375
380
  }
376
381
  }
377
- this.formatter.editorManager.execCommand(tool.command, tool.subCommand ? tool.subCommand : (value ? value : tool.value), null, null, (value ? value : tool.value), (value ? value : tool.value));
382
+ internalValue = value;
383
+ if (tool.command === 'FormatPainter') {
384
+ if (!isNOU(value)) {
385
+ this.formatPainterSettings = value;
386
+ }
387
+ internalValue = {
388
+ formatPainterAction: tool.value
389
+ };
390
+ }
391
+ this.formatter.editorManager.execCommand(tool.command, tool.subCommand ? tool.subCommand : (internalValue ? internalValue : tool.value), null, null, (internalValue ? internalValue : tool.value), (internalValue ? internalValue : tool.value));
378
392
  if (option && option.undo) {
379
393
  this.formatter.saveData();
380
394
  this.formatter.enableUndo(this);
@@ -632,11 +646,13 @@ var RichTextEditor = /** @class */ (function (_super) {
632
646
  var endNode = range.endContainer.nodeName === '#text' ? range.endContainer.parentElement :
633
647
  range.endContainer;
634
648
  var closestLI = closest(endNode, 'LI');
649
+ var isDetached = false;
635
650
  if (!isNOU(closestLI) && endNode.textContent.length === range.endOffset &&
636
651
  !range.collapsed && isNOU(endNode.nextElementSibling)) {
637
652
  for (var i = 0; i < closestLI.childNodes.length; i++) {
638
653
  if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
639
654
  detach(closestLI.childNodes[i]);
655
+ isDetached = true;
640
656
  i--;
641
657
  }
642
658
  }
@@ -644,7 +660,11 @@ var RichTextEditor = /** @class */ (function (_super) {
644
660
  while (currentLastElem.lastChild !== null && currentLastElem.nodeName !== '#text') {
645
661
  currentLastElem = currentLastElem.lastChild;
646
662
  }
647
- this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), isSameContainer ? currentStartContainer : (currentLastElem.nodeName === 'BR' && !isNOU(currentLastElem.previousSibling) ? currentLastElem.previousSibling : currentStartContainer), currentEndContainer, currentStartOffset, (currentLastElem.nodeName === 'BR' ? 0 : currentEndOffset));
663
+ if (isDetached) {
664
+ var currentLast = currentLastElem.nodeName === 'BR' && !isNOU(currentLastElem.previousSibling) ?
665
+ currentLastElem.previousSibling : currentLastElem;
666
+ this.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(), isSameContainer ? currentLast : currentStartContainer, currentLast, currentStartOffset, (currentLast.nodeName === 'BR' ? 0 : currentLast.textContent.length));
667
+ }
648
668
  }
649
669
  };
650
670
  /**
@@ -708,14 +728,21 @@ var RichTextEditor = /** @class */ (function (_super) {
708
728
  this.formatter.saveData();
709
729
  }
710
730
  if (e.action !== 'insert-link' &&
731
+ e.action !== 'format-copy' && e.action !== 'format-paste' &&
711
732
  (e.action && e.action !== 'paste' && e.action !== 'space'
712
733
  || e.which === 9 || (e.code === 'Backspace' && e.which === 8))) {
713
- this.formatter.process(this, null, e);
734
+ var FormatPainterEscapeAction = false;
735
+ if (!isNOU(this.formatPainterModule)) {
736
+ FormatPainterEscapeAction = this.formatPainterModule.previousAction === 'escape';
737
+ }
738
+ if (!FormatPainterEscapeAction) {
739
+ this.formatter.process(this, null, e);
740
+ }
714
741
  switch (e.action) {
715
742
  case 'toolbar-focus':
716
743
  if (this.toolbarSettings.enable) {
717
744
  // eslint-disable-next-line
718
- var selector = '.e-toolbar-item[aria-disabled="false"][title] [tabindex]';
745
+ var selector = '.e-toolbar-item[title] [tabindex]';
719
746
  this.toolbarModule.baseToolbar.toolbarObj.element.querySelector(selector).focus();
720
747
  }
721
748
  break;
@@ -1663,6 +1690,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1663
1690
  }
1664
1691
  else {
1665
1692
  var compiledTemplate = compile(this.valueTemplate)('', this, 'valueTemplate');
1693
+ // eslint-disable-next-line
1666
1694
  if (typeof this.valueTemplate !== 'string' && this.isReact) {
1667
1695
  this.displayTempElem = this.createElement('div');
1668
1696
  for (var i = 0; i < compiledTemplate.length; i++) {
@@ -1702,7 +1730,7 @@ var RichTextEditor = /** @class */ (function (_super) {
1702
1730
  }
1703
1731
  }
1704
1732
  };
1705
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1733
+ // eslint-disable-next-line
1706
1734
  RichTextEditor.prototype.renderTemplates = function (callBack) {
1707
1735
  this.renderReactTemplates(callBack);
1708
1736
  };
@@ -1816,7 +1844,9 @@ var RichTextEditor = /** @class */ (function (_super) {
1816
1844
  * @public
1817
1845
  */
1818
1846
  RichTextEditor.prototype.getHtml = function () {
1819
- return this.serializeValue(this.contentModule.getEditPanel().innerHTML);
1847
+ var htmlValue = this.contentModule.getEditPanel().innerHTML;
1848
+ return (this.enableXhtml && (htmlValue === '<p><br></p>' || htmlValue === '<div><br></div>' ||
1849
+ htmlValue === '<br>') ? null : this.serializeValue(htmlValue));
1820
1850
  };
1821
1851
  /**
1822
1852
  * Retrieves the Rich Text Editor's XHTML validated HTML content when `enableXhtml` property is enabled.
@@ -2067,8 +2097,8 @@ var RichTextEditor = /** @class */ (function (_super) {
2067
2097
  }
2068
2098
  var getTextArea = this.element.querySelector('.e-rte-srctextarea');
2069
2099
  if (this.editorMode === 'HTML') {
2070
- value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>'
2071
- || this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
2100
+ value = (this.inputElement.innerHTML === '<p><br></p>' || this.inputElement.innerHTML === '<div><br></div>' ||
2101
+ this.inputElement.innerHTML === '<br>') ? null : this.enableHtmlEncode ?
2072
2102
  this.encode(decode(this.inputElement.innerHTML)) : this.inputElement.innerHTML;
2073
2103
  if (getTextArea && getTextArea.style.display === 'block') {
2074
2104
  value = getTextArea.value;
@@ -2420,6 +2450,9 @@ var RichTextEditor = /** @class */ (function (_super) {
2420
2450
  __decorate([
2421
2451
  Complex({}, PasteCleanupSettings)
2422
2452
  ], RichTextEditor.prototype, "pasteCleanupSettings", void 0);
2453
+ __decorate([
2454
+ Complex({}, FormatPainterSettings)
2455
+ ], RichTextEditor.prototype, "formatPainterSettings", void 0);
2423
2456
  __decorate([
2424
2457
  Complex({}, IFrameSettings)
2425
2458
  ], RichTextEditor.prototype, "iframeSettings", void 0);
@@ -2450,6 +2483,9 @@ var RichTextEditor = /** @class */ (function (_super) {
2450
2483
  __decorate([
2451
2484
  Property(false)
2452
2485
  ], RichTextEditor.prototype, "enablePersistence", void 0);
2486
+ __decorate([
2487
+ Property(true)
2488
+ ], RichTextEditor.prototype, "showTooltip", void 0);
2453
2489
  __decorate([
2454
2490
  Property(false)
2455
2491
  ], RichTextEditor.prototype, "enableResize", void 0);
@@ -512,6 +512,8 @@ export function decode(value) {
512
512
  export function sanitizeHelper(value, parent) {
513
513
  if (parent.enableHtmlSanitizer) {
514
514
  var item = SanitizeHtmlHelper.beforeSanitize();
515
+ if (item.selectors.tags[2] && item.selectors.tags[2].indexOf('iframe') > -1)
516
+ item.selectors.tags[2] = 'iframe:not(.e-rte-embed-url)';
515
517
  var beforeEvent = {
516
518
  cancel: false,
517
519
  helper: null
@@ -1,4 +1,4 @@
1
- import { extend, isNullOrUndefined, Browser } from '@syncfusion/ej2-base';
1
+ import { extend, isNullOrUndefined as isNOU, Browser } from '@syncfusion/ej2-base';
2
2
  import * as CONSTANT from '../base/constant';
3
3
  import { updateUndoRedoStatus, isIDevice } from '../base/util';
4
4
  import { KEY_DOWN, KEY_UP } from './../../common/constant';
@@ -27,10 +27,16 @@ var Formatter = /** @class */ (function () {
27
27
  var selection = self.contentModule.getDocument().getSelection();
28
28
  var range = (selection.rangeCount > 0) ? selection.getRangeAt(selection.rangeCount - 1) : null;
29
29
  var saveSelection;
30
+ var isKeyboardVideoInsert = (!isNOU(value) && !isNOU(value.cssClass) &&
31
+ value.cssClass !== 'e-video-inline');
30
32
  if (self.editorMode === 'HTML') {
31
- saveSelection = this.editorManager.nodeSelection.save(range, self.contentModule.getDocument());
33
+ if (!isNOU(args) && !isKeyboardVideoInsert) {
34
+ if (isNOU(args.name) || (!isNOU(args.name) && args.name !== 'showDialog')) {
35
+ saveSelection = this.editorManager.nodeSelection.save(range, self.contentModule.getDocument());
36
+ }
37
+ }
32
38
  }
33
- if (!isNullOrUndefined(args)
39
+ if (!isNOU(args)
34
40
  && args.item.command
35
41
  && args.item.command !== 'Table'
36
42
  && args.item.command !== 'Actions'
@@ -45,7 +51,7 @@ var Formatter = /** @class */ (function () {
45
51
  || self.contentModule.getPanel() === range.commonAncestorContainer)) {
46
52
  return;
47
53
  }
48
- if (!isNullOrUndefined(args) && self.maxLength !== -1 && !isNullOrUndefined(args.item.command)) {
54
+ if (!isNOU(args) && self.maxLength !== -1 && !isNOU(args.item.command)) {
49
55
  var currentInsertContentLength = 0;
50
56
  if (args.item.command === 'Links') {
51
57
  currentInsertContentLength = value.text.length === 0 ? value.url.length : value.text.length;
@@ -60,7 +66,7 @@ var Formatter = /** @class */ (function () {
60
66
  return;
61
67
  }
62
68
  }
63
- if (isNullOrUndefined(args)) {
69
+ if (isNOU(args)) {
64
70
  var action_1 = event.action;
65
71
  if (action_1 !== 'tab' && action_1 !== 'enter' && action_1 !== 'space' && action_1 !== 'escape') {
66
72
  args = {};
@@ -84,7 +90,7 @@ var Formatter = /** @class */ (function () {
84
90
  }
85
91
  });
86
92
  }
87
- var isTableModule = isNullOrUndefined(self.tableModule) ? true : self.tableModule ?
93
+ var isTableModule = isNOU(self.tableModule) ? true : self.tableModule ?
88
94
  self.tableModule.ensureInsideTableList : false;
89
95
  if ((event.which === 9 && isTableModule) || event.which !== 9) {
90
96
  if (event.which === 13 && self.editorMode === 'HTML') {
@@ -100,22 +106,25 @@ var Formatter = /** @class */ (function () {
100
106
  });
101
107
  }
102
108
  }
103
- else if (!isNullOrUndefined(args) && args.item.command && args.item.subCommand && ((args.item.command !== args.item.subCommand
109
+ else if (!isNOU(args) && args.item.command && args.item.subCommand && ((args.item.command !== args.item.subCommand
104
110
  && args.item.command !== 'Font')
105
111
  || ((args.item.subCommand === 'FontName' || args.item.subCommand === 'FontSize') && args.name === 'dropDownSelect')
106
112
  || ((args.item.subCommand === 'BackgroundColor' || args.item.subCommand === 'FontColor')
107
- && args.name === 'colorPickerChanged'))) {
113
+ && args.name === 'colorPickerChanged') || args.item.subCommand === 'FormatPainter')) {
108
114
  extend(args, args, { requestType: args.item.subCommand, cancel: false, itemCollection: value, selectType: args.name }, true);
109
115
  self.trigger(CONSTANT.actionBegin, args, function (actionBeginArgs) {
110
116
  if (!actionBeginArgs.cancel) {
117
+ var formatPainterCopyAction = !isNOU(actionBeginArgs.name) && actionBeginArgs.name === 'format-copy';
111
118
  if (_this.getUndoRedoStack().length === 0 && actionBeginArgs.item.command !== 'Links'
112
- && actionBeginArgs.item.command !== 'Images') {
119
+ && actionBeginArgs.item.command !== 'Images' && !formatPainterCopyAction) {
113
120
  _this.saveData();
114
121
  }
115
122
  self.isBlur = false;
116
123
  self.contentModule.getEditPanel().focus();
117
- if (self.editorMode === 'HTML') {
118
- saveSelection.restore();
124
+ if (self.editorMode === 'HTML' && !isKeyboardVideoInsert) {
125
+ if (isNOU(args.selectType) || (!isNOU(args.selectType) && args.selectType !== 'showDialog')) {
126
+ saveSelection.restore();
127
+ }
119
128
  }
120
129
  var command = actionBeginArgs.item.subCommand.toLocaleLowerCase();
121
130
  if (command === 'paste' || command === 'cut' || command === 'copy') {
@@ -129,7 +138,7 @@ var Formatter = /** @class */ (function () {
129
138
  }
130
139
  });
131
140
  }
132
- if (isNullOrUndefined(event) || event && event.action !== 'copy') {
141
+ if (isNOU(event) || event && event.action !== 'copy') {
133
142
  this.enableUndo(self);
134
143
  }
135
144
  };
@@ -166,7 +175,7 @@ var Formatter = /** @class */ (function () {
166
175
  */
167
176
  Formatter.prototype.onSuccess = function (self, events) {
168
177
  self.notify(CONSTANT.contentChanged, {});
169
- if (events && (isNullOrUndefined(events.event) || events.event.action !== 'copy')) {
178
+ if (events && (isNOU(events.event) || events.event.action !== 'copy')) {
170
179
  this.enableUndo(self);
171
180
  self.notify(CONSTANT.execCommandCallBack, events);
172
181
  }
@@ -1,5 +1,6 @@
1
1
  import { Formatter } from './formatter';
2
2
  import { IEditorModel, IHtmlFormatterModel } from './../base/interface';
3
+ import { FormatPainterSettingsModel } from '../models';
3
4
  /**
4
5
  * HTML adapter
5
6
  *
@@ -19,14 +20,15 @@ export declare class HTMLFormatter extends Formatter {
19
20
  /**
20
21
  * Update the formatter of RichTextEditor
21
22
  *
22
- * @param {Element} editElement - specifies the edit element.
23
- * @param {Document} doc - specifies the doucment
23
+ * @param {Element} editElement - specifies the edit element.
24
+ * @param {Document} doc - specifies the doucment
24
25
  * @param {number} options - specifies the options
26
+ * @param {FormatPainterSettingsModel} formatPainterSettings - specifies the format painter settings
25
27
  * @returns {void}
26
28
  * @hidden
27
29
 
28
30
  */
29
31
  updateFormatter(editElement: Element, doc?: Document, options?: {
30
32
  [key: string]: number;
31
- }): void;
33
+ }, formatPainterSettings?: FormatPainterSettingsModel): void;
32
34
  }
@@ -28,7 +28,7 @@ var HTMLFormatter = /** @class */ (function (_super) {
28
28
  _this.initialize();
29
29
  extend(_this, _this, options, true);
30
30
  if (_this.currentDocument && _this.element) {
31
- _this.updateFormatter(_this.element, _this.currentDocument, options.options);
31
+ _this.updateFormatter(_this.element, _this.currentDocument, options.options, options.formatPainterSettings);
32
32
  }
33
33
  return _this;
34
34
  }
@@ -38,19 +38,21 @@ var HTMLFormatter = /** @class */ (function (_super) {
38
38
  /**
39
39
  * Update the formatter of RichTextEditor
40
40
  *
41
- * @param {Element} editElement - specifies the edit element.
42
- * @param {Document} doc - specifies the doucment
41
+ * @param {Element} editElement - specifies the edit element.
42
+ * @param {Document} doc - specifies the doucment
43
43
  * @param {number} options - specifies the options
44
+ * @param {FormatPainterSettingsModel} formatPainterSettings - specifies the format painter settings
44
45
  * @returns {void}
45
46
  * @hidden
46
47
 
47
48
  */
48
- HTMLFormatter.prototype.updateFormatter = function (editElement, doc, options) {
49
+ HTMLFormatter.prototype.updateFormatter = function (editElement, doc, options, formatPainterSettings) {
49
50
  if (editElement && doc) {
50
51
  this.editorManager = new EditorManager({
51
52
  document: doc,
52
53
  editableElement: editElement,
53
- options: options
54
+ options: options,
55
+ formatPainterSettings: formatPainterSettings
54
56
  });
55
57
  }
56
58
  };
@@ -190,7 +190,8 @@ export var defaultLocale = {
190
190
  'bulletFormatListCircle': 'Circle',
191
191
  'bulletFormatListSquare': 'Square',
192
192
  'numberFormatListNone': 'None',
193
- 'bulletFormatListNone': 'None'
193
+ 'bulletFormatListNone': 'None',
194
+ 'formatPainter': 'Format Painter'
194
195
  };
195
196
  export var toolsLocale = {
196
197
  'alignments': 'alignments',
@@ -277,7 +278,8 @@ export var toolsLocale = {
277
278
  'alignbottom': 'AlignBottom',
278
279
  'insertrowbefore': 'insertRowBefore',
279
280
  'insertrowafter': 'insertRowAfter',
280
- 'deleterow': 'deleteRow'
281
+ 'deleterow': 'deleteRow',
282
+ 'formatpainter': 'formatPainter'
281
283
  };
282
284
  export var fontNameLocale = [
283
285
  { locale: 'fontNameSegoeUI', value: 'Segoe UI' },
@@ -30,3 +30,6 @@ export declare const backgroundColor: {
30
30
  export declare const numberFormatList: IListDropDownModel[];
31
31
  export declare const bulletFormatList: IListDropDownModel[];
32
32
  export declare function updateDropDownLocale(self: IRichTextEditor): void;
33
+ export declare let windowKeys: {
34
+ [key: string]: string;
35
+ };
@@ -551,6 +551,13 @@ export var tools = {
551
551
  'tooltip': 'Styles',
552
552
  'command': 'Table',
553
553
  'subCommand': 'Styles'
554
+ },
555
+ 'formatpainter': {
556
+ 'id': 'FormatPainter',
557
+ 'icon': 'e-rte-format-painter',
558
+ 'tooltip': 'Format Painter',
559
+ 'command': 'FormatPainter',
560
+ 'subCommand': 'FormatPainter'
554
561
  }
555
562
  };
556
563
  var alignmentLocale = [
@@ -740,3 +747,28 @@ export function updateDropDownLocale(self) {
740
747
  TableStyleItems[i].text = getLocale(self, tableStyleLocale, TableStyleItems[i]);
741
748
  });
742
749
  }
750
+ export var windowKeys = {
751
+ 'Insert Link': 'Ctrl + K',
752
+ 'Insert Image': 'Ctrl + Shift + I',
753
+ 'Create Table': 'Ctrl + Shift + E',
754
+ 'Undo': 'Ctrl + Z',
755
+ 'Redo': 'Ctrl + Y',
756
+ 'Copy': 'Ctrl + C',
757
+ 'Cut': 'Ctrl + X',
758
+ 'Paste': 'Ctrl + V',
759
+ 'Bold': 'Ctrl + B',
760
+ 'Italic': 'Ctrl + I',
761
+ 'Underline': 'Ctrl + U',
762
+ 'Strikethrough': 'Ctrl + Shift + S',
763
+ 'Upper Case': 'Ctrl + Shift + U',
764
+ 'Lower Case': 'Ctrl + Shift + L',
765
+ 'Superscript': 'Ctrl + Shift + =',
766
+ 'Subscript': 'Ctrl + =',
767
+ 'Source Code': 'Ctrl + Shift + H',
768
+ 'Maximize': 'Ctrl + Shift + F',
769
+ 'Minimize': 'Esc',
770
+ 'Clear Format': 'Ctrl + Shift + R',
771
+ 'Numbered List': 'Ctrl + Shift + O',
772
+ 'Bulleted List': 'Ctrl + Alt + O',
773
+ 'Format Painter': 'Ctrl + Shift + C, Ctrl + Shift + V'
774
+ };
@@ -1,4 +1,4 @@
1
- import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';import { AjaxSettings, AjaxSettingsModel, ContextMenuSettings, ContextMenuSettingsModel } from '@syncfusion/ej2-filemanager';import { DetailsViewSettings, DetailsViewSettingsModel, NavigationPaneSettings } from '@syncfusion/ej2-filemanager';import { NavigationPaneSettingsModel, SearchSettings, SearchSettingsModel, SortOrder } from '@syncfusion/ej2-filemanager';import { ToolbarSettingsModel as FileToolbarSettingsModel, ToolbarSettings as FileToolbarSettings } from '@syncfusion/ej2-filemanager';import { UploadSettings, UploadSettingsModel, ViewType } from '@syncfusion/ej2-filemanager';import { SaveFormat, DisplayLayoutOptions } from '../../common';import { ToolbarType, ActionOnScroll, ToolbarItems } from '../base/enum';import { IToolbarItems, IDropDownItemModel, ColorModeType, IToolsItemConfigs, IListDropDownModel } from '../base/interface';import { backgroundColor, fontColor, fontFamily, fontSize, formatItems, predefinedItems, TableStyleItems, numberFormatList, bulletFormatList } from './items';
1
+ import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';import { AjaxSettings, AjaxSettingsModel, ContextMenuSettings, ContextMenuSettingsModel } from '@syncfusion/ej2-filemanager';import { DetailsViewSettings, DetailsViewSettingsModel, NavigationPaneSettings } from '@syncfusion/ej2-filemanager';import { NavigationPaneSettingsModel, SearchSettings, SearchSettingsModel, SortOrder } from '@syncfusion/ej2-filemanager';import { ToolbarSettingsModel as FileToolbarSettingsModel, ToolbarSettings as FileToolbarSettings } from '@syncfusion/ej2-filemanager';import { UploadSettings, UploadSettingsModel, ViewType } from '@syncfusion/ej2-filemanager';import { SaveFormat, DisplayLayoutOptions } from '../../common';import { ToolbarType, ActionOnScroll, ToolbarItems, FormatPainterContext } from '../base/enum';import { IToolbarItems, IDropDownItemModel, ColorModeType, IToolsItemConfigs, IListDropDownModel } from '../base/interface';import { backgroundColor, fontColor, fontFamily, fontSize, formatItems, predefinedItems, TableStyleItems, numberFormatList, bulletFormatList } from './items';
2
2
 
3
3
  /**
4
4
  * Interface for a class ToolbarSettings
@@ -575,6 +575,34 @@ export interface QuickToolbarSettingsModel {
575
575
 
576
576
  }
577
577
 
578
+ /**
579
+ * Interface for a class FormatPainterSettings
580
+ */
581
+ export interface FormatPainterSettingsModel {
582
+
583
+ /**
584
+ * Defines the context or contexts in which styles will be copied.
585
+ *
586
+ * @default ['Text', 'List', 'Table']
587
+ */
588
+ allowedContext?: FormatPainterContext[];
589
+
590
+ /**
591
+ * Defines the tag name selectors for obtaining the formats from the elements.
592
+ *
593
+ * @default 'b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; table; thead; tbody; tr; td; th; ol; ul; li; pre;'
594
+ */
595
+ allowedFormats?: string;
596
+
597
+ /**
598
+ * Defines selectors for the elements from which fetching formats is expressly prohibited.
599
+ *
600
+ * @default null
601
+ */
602
+ deniedFormats?: string;
603
+
604
+ }
605
+
578
606
  /**
579
607
  * Interface for a class PasteCleanupSettings
580
608
  */