@syncfusion/ej2-richtexteditor 24.1.41-569421 → 24.1.41-581025

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 (167) hide show
  1. package/CHANGELOG.md +0 -176
  2. package/dist/ej2-richtexteditor.umd.min.js +1 -1
  3. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-richtexteditor.es2015.js +7822 -9502
  5. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-richtexteditor.es5.js +5674 -7355
  7. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  8. package/package.json +12 -12
  9. package/src/common/config.d.ts +0 -7
  10. package/src/common/config.js +0 -11
  11. package/src/common/constant.d.ts +0 -6
  12. package/src/common/constant.js +0 -6
  13. package/src/common/interface.d.ts +0 -12
  14. package/src/common/types.d.ts +0 -6
  15. package/src/common/util.d.ts +0 -6
  16. package/src/common/util.js +20 -61
  17. package/src/editor-manager/base/constant.d.ts +0 -6
  18. package/src/editor-manager/base/constant.js +0 -6
  19. package/src/editor-manager/base/editor-manager.d.ts +0 -5
  20. package/src/editor-manager/base/editor-manager.js +0 -59
  21. package/src/editor-manager/base/interface.d.ts +0 -8
  22. package/src/editor-manager/plugin/dom-node.d.ts +1 -5
  23. package/src/editor-manager/plugin/dom-node.js +15 -169
  24. package/src/editor-manager/plugin/format-painter-actions.d.ts +0 -1
  25. package/src/editor-manager/plugin/format-painter-actions.js +1 -19
  26. package/src/editor-manager/plugin/formats.d.ts +0 -1
  27. package/src/editor-manager/plugin/formats.js +3 -38
  28. package/src/editor-manager/plugin/image.js +16 -12
  29. package/src/editor-manager/plugin/indents.js +1 -1
  30. package/src/editor-manager/plugin/inserthtml.d.ts +0 -1
  31. package/src/editor-manager/plugin/inserthtml.js +18 -78
  32. package/src/editor-manager/plugin/link.js +3 -8
  33. package/src/editor-manager/plugin/lists.js +70 -159
  34. package/src/editor-manager/plugin/ms-word-clean-up.d.ts +0 -3
  35. package/src/editor-manager/plugin/ms-word-clean-up.js +85 -212
  36. package/src/editor-manager/plugin/nodecutter.js +2 -5
  37. package/src/editor-manager/plugin/selection-commands.d.ts +0 -2
  38. package/src/editor-manager/plugin/selection-commands.js +4 -209
  39. package/src/editor-manager/plugin/table.d.ts +1 -4
  40. package/src/editor-manager/plugin/table.js +49 -95
  41. package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
  42. package/src/editor-manager/plugin/toolbar-status.js +10 -20
  43. package/src/editor-manager/plugin/undo.d.ts +0 -1
  44. package/src/editor-manager/plugin/undo.js +1 -21
  45. package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +3 -4
  46. package/src/rich-text-editor/actions/base-quick-toolbar.js +10 -43
  47. package/src/rich-text-editor/actions/base-toolbar.js +34 -33
  48. package/src/rich-text-editor/actions/color-picker.d.ts +0 -1
  49. package/src/rich-text-editor/actions/color-picker.js +0 -10
  50. package/src/rich-text-editor/actions/count.js +1 -1
  51. package/src/rich-text-editor/actions/dropdown-buttons.d.ts +0 -1
  52. package/src/rich-text-editor/actions/dropdown-buttons.js +4 -8
  53. package/src/rich-text-editor/actions/emoji-picker.js +4 -4
  54. package/src/rich-text-editor/actions/enter-key.js +4 -8
  55. package/src/rich-text-editor/actions/format-painter.js +1 -4
  56. package/src/rich-text-editor/actions/full-screen.js +2 -3
  57. package/src/rich-text-editor/actions/html-editor.d.ts +2 -2
  58. package/src/rich-text-editor/actions/html-editor.js +42 -123
  59. package/src/rich-text-editor/actions/keyboard.js +1 -3
  60. package/src/rich-text-editor/actions/markdown-editor.js +1 -3
  61. package/src/rich-text-editor/actions/paste-clean-up.d.ts +0 -3
  62. package/src/rich-text-editor/actions/paste-clean-up.js +14 -85
  63. package/src/rich-text-editor/actions/quick-toolbar.d.ts +0 -8
  64. package/src/rich-text-editor/actions/quick-toolbar.js +9 -37
  65. package/src/rich-text-editor/actions/resize.js +1 -2
  66. package/src/rich-text-editor/actions/toolbar-action.js +1 -1
  67. package/src/rich-text-editor/actions/toolbar.d.ts +3 -2
  68. package/src/rich-text-editor/actions/toolbar.js +87 -18
  69. package/src/rich-text-editor/base/classes.d.ts +5 -0
  70. package/src/rich-text-editor/base/classes.js +5 -0
  71. package/src/rich-text-editor/base/constant.d.ts +0 -40
  72. package/src/rich-text-editor/base/constant.js +0 -209
  73. package/src/rich-text-editor/base/interface.d.ts +3 -37
  74. package/src/rich-text-editor/base/rich-text-editor-model.d.ts +3 -3
  75. package/src/rich-text-editor/base/rich-text-editor.d.ts +4 -7
  76. package/src/rich-text-editor/base/rich-text-editor.js +132 -156
  77. package/src/rich-text-editor/base/util.js +2 -11
  78. package/src/rich-text-editor/formatter/formatter.js +4 -16
  79. package/src/rich-text-editor/models/default-locale.js +26 -30
  80. package/src/rich-text-editor/models/items.js +2 -2
  81. package/src/rich-text-editor/models/toolbar-settings-model.d.ts +1 -1
  82. package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
  83. package/src/rich-text-editor/models/toolbar-settings.js +1 -1
  84. package/src/rich-text-editor/renderer/audio-module.d.ts +0 -1
  85. package/src/rich-text-editor/renderer/audio-module.js +4 -22
  86. package/src/rich-text-editor/renderer/dialog-renderer.d.ts +0 -2
  87. package/src/rich-text-editor/renderer/dialog-renderer.js +1 -12
  88. package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -2
  89. package/src/rich-text-editor/renderer/image-module.d.ts +1 -9
  90. package/src/rich-text-editor/renderer/image-module.js +168 -203
  91. package/src/rich-text-editor/renderer/link-module.js +1 -10
  92. package/src/rich-text-editor/renderer/table-module.d.ts +1 -8
  93. package/src/rich-text-editor/renderer/table-module.js +139 -301
  94. package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +0 -3
  95. package/src/rich-text-editor/renderer/toolbar-renderer.js +9 -94
  96. package/src/rich-text-editor/renderer/video-module.d.ts +0 -3
  97. package/src/rich-text-editor/renderer/video-module.js +41 -82
  98. package/src/rich-text-editor/renderer/view-source.d.ts +0 -1
  99. package/src/rich-text-editor/renderer/view-source.js +4 -12
  100. package/src/selection/selection.js +0 -3
  101. package/styles/bootstrap-dark.css +53 -161
  102. package/styles/bootstrap.css +61 -162
  103. package/styles/bootstrap4.css +46 -146
  104. package/styles/bootstrap5-dark.css +46 -151
  105. package/styles/bootstrap5.css +46 -151
  106. package/styles/fabric-dark.css +40 -140
  107. package/styles/fabric.css +41 -141
  108. package/styles/fluent-dark.css +47 -165
  109. package/styles/fluent.css +47 -165
  110. package/styles/highcontrast-light.css +40 -140
  111. package/styles/highcontrast.css +41 -144
  112. package/styles/material-dark.css +41 -145
  113. package/styles/material.css +41 -145
  114. package/styles/material3-dark.css +50 -156
  115. package/styles/material3.css +50 -156
  116. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +13 -17
  117. package/styles/rich-text-editor/_bootstrap-definition.scss +19 -22
  118. package/styles/rich-text-editor/_bootstrap4-definition.scss +7 -11
  119. package/styles/rich-text-editor/_bootstrap5-definition.scss +3 -7
  120. package/styles/rich-text-editor/_fabric-dark-definition.scss +2 -6
  121. package/styles/rich-text-editor/_fabric-definition.scss +3 -7
  122. package/styles/rich-text-editor/_fluent-definition.scss +9 -13
  123. package/styles/rich-text-editor/_fusionnew-definition.scss +3 -7
  124. package/styles/rich-text-editor/_highcontrast-definition.scss +3 -7
  125. package/styles/rich-text-editor/_highcontrast-light-definition.scss +2 -6
  126. package/styles/rich-text-editor/_layout.scss +31 -133
  127. package/styles/rich-text-editor/_material-dark-definition.scss +2 -6
  128. package/styles/rich-text-editor/_material-definition.scss +2 -6
  129. package/styles/rich-text-editor/_material3-definition.scss +12 -16
  130. package/styles/rich-text-editor/_tailwind-definition.scss +19 -23
  131. package/styles/rich-text-editor/_theme.scss +23 -112
  132. package/styles/rich-text-editor/bootstrap-dark.css +53 -161
  133. package/styles/rich-text-editor/bootstrap.css +61 -162
  134. package/styles/rich-text-editor/bootstrap4.css +46 -146
  135. package/styles/rich-text-editor/bootstrap5-dark.css +46 -151
  136. package/styles/rich-text-editor/bootstrap5.css +46 -151
  137. package/styles/rich-text-editor/fabric-dark.css +40 -140
  138. package/styles/rich-text-editor/fabric.css +41 -141
  139. package/styles/rich-text-editor/fluent-dark.css +47 -165
  140. package/styles/rich-text-editor/fluent.css +47 -165
  141. package/styles/rich-text-editor/highcontrast-light.css +40 -140
  142. package/styles/rich-text-editor/highcontrast.css +41 -144
  143. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +2 -2
  144. package/styles/rich-text-editor/icons/_bootstrap.scss +2 -2
  145. package/styles/rich-text-editor/icons/_bootstrap4.scss +2 -2
  146. package/styles/rich-text-editor/icons/_bootstrap5.scss +2 -2
  147. package/styles/rich-text-editor/icons/_fabric-dark.scss +2 -2
  148. package/styles/rich-text-editor/icons/_fabric.scss +2 -2
  149. package/styles/rich-text-editor/icons/_fluent.scss +2 -2
  150. package/styles/rich-text-editor/icons/_highcontrast-light.scss +2 -2
  151. package/styles/rich-text-editor/icons/_highcontrast.scss +2 -2
  152. package/styles/rich-text-editor/icons/_material-dark.scss +2 -2
  153. package/styles/rich-text-editor/icons/_material.scss +2 -2
  154. package/styles/rich-text-editor/icons/_material3.scss +2 -2
  155. package/styles/rich-text-editor/icons/_tailwind.scss +2 -2
  156. package/styles/rich-text-editor/material-dark.css +41 -145
  157. package/styles/rich-text-editor/material.css +41 -145
  158. package/styles/rich-text-editor/material3-dark.css +50 -156
  159. package/styles/rich-text-editor/material3.css +50 -156
  160. package/styles/rich-text-editor/tailwind-dark.css +63 -191
  161. package/styles/rich-text-editor/tailwind.css +63 -191
  162. package/styles/tailwind-dark.css +63 -191
  163. package/styles/tailwind.css +63 -191
  164. package/.eslintrc.json +0 -260
  165. package/src/global.d.ts +0 -1
  166. package/styles/rich-text-editor/_bds-definition.scss +0 -279
  167. package/styles/rich-text-editor/icons/_bds.scss +0 -348
@@ -4,7 +4,7 @@ import * as events from '../base/constant';
4
4
  import { pageYOffset, hasClass, isIDevice } from '../base/util';
5
5
  import { BaseQuickToolbar } from './base-quick-toolbar';
6
6
  import { PopupRenderer } from '../renderer/popup-renderer';
7
- import { CLS_INLINE_POP, CLS_INLINE, CLS_VID_CLICK_ELEM } from '../base/classes';
7
+ import { CLS_INLINE_POP, CLS_INLINE } from '../base/classes';
8
8
  /**
9
9
  * `Quick toolbar` module is used to handle Quick toolbar actions.
10
10
  */
@@ -149,7 +149,7 @@ var QuickToolbar = /** @class */ (function () {
149
149
  * @deprecated
150
150
  */
151
151
  QuickToolbar.prototype.showInlineQTBar = function (x, y, target) {
152
- if (isNOU(this.parent) || this.parent.readonly || target.tagName.toLowerCase() === 'img' || this.inlineQTBar.element.querySelector('.e-rte-color-content')) {
152
+ if (isNOU(this.parent) || this.parent.readonly || target.tagName.toLowerCase() === 'img') {
153
153
  return;
154
154
  }
155
155
  this.inlineQTBar.showPopup(x, y, target);
@@ -238,9 +238,6 @@ var QuickToolbar = /** @class */ (function () {
238
238
  }
239
239
  }
240
240
  if (!isNOU(this.textQTBar) && !isNOU(this.parent.quickToolbarSettings.text) && !this.parent.inlineMode.enable) {
241
- if (!isNOU(e) && !isNOU(e.name) && e.name === 'sourceCodeMouseDown') {
242
- return;
243
- }
244
241
  var args = e.args.touches ?
245
242
  e.args.changedTouches[0] : e.args;
246
243
  var target = e.args.target;
@@ -251,7 +248,7 @@ var QuickToolbar = /** @class */ (function () {
251
248
  this.offsetY = pageYOffset(args, this.parent.element, this.parent.iframeSettings.enable);
252
249
  var range = this.parent.getRange();
253
250
  if ((range.endContainer.parentElement.tagName === range.startContainer.parentElement.tagName && (range.startContainer.parentElement.tagName === 'A' && range.endContainer.parentElement.tagName === 'A')) ||
254
- (target.tagName === 'IMG') || (target.tagName === 'VIDEO' || this.isEmbedVidElem(target)) || (target.tagName === 'AUDIO') || (target.childNodes[0] && target.childNodes[0].nodeType === 1 && target.childNodes[0].classList.contains('e-rte-audio')) ||
251
+ (target.tagName === 'IMG') || (target.tagName === 'VIDEO') || (target.tagName === 'AUDIO') || (target.childNodes[0].nodeType === 1 && target.childNodes[0].classList.contains('e-rte-audio')) ||
255
252
  (this.parent.getRange().startOffset === this.parent.getRange().endOffset)) {
256
253
  return;
257
254
  }
@@ -259,29 +256,13 @@ var QuickToolbar = /** @class */ (function () {
259
256
  this.textQTBar.showPopup(this.offsetX, this.offsetY, target, 'text');
260
257
  }
261
258
  };
262
- QuickToolbar.prototype.isEmbedVidElem = function (target) {
263
- if ((target && target.nodeType !== 3 && target.nodeName !== 'BR' && (target.classList && target.classList.contains(CLS_VID_CLICK_ELEM))) ||
264
- (target && target.nodeName === 'IFRAME')) {
265
- return true;
266
- }
267
- else {
268
- return false;
269
- }
270
- };
271
- QuickToolbar.prototype.keyDownHandler = function (e) {
272
- var preventHide = e.args.altKey;
273
- if (this.parent.inlineMode.enable && e.args.metaKey && e.args.keyCode === 65) {
274
- this.showInlineQTBar(this.offsetX, this.offsetY, e.args.target);
275
- return;
259
+ QuickToolbar.prototype.keyDownHandler = function () {
260
+ if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
261
+ && !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
262
+ this.hideInlineQTBar();
276
263
  }
277
- if (!preventHide) {
278
- if ((this.parent.inlineMode.enable && (!Browser.isDevice || isIDevice()))
279
- && !isNullOrUndefined(select('.' + CLS_INLINE_POP, document))) {
280
- this.hideInlineQTBar();
281
- }
282
- if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
283
- this.textQTBar.hidePopup();
284
- }
264
+ if (this.textQTBar && !hasClass(this.textQTBar.element, 'e-popup-close')) {
265
+ this.textQTBar.hidePopup();
285
266
  }
286
267
  };
287
268
  QuickToolbar.prototype.inlineQTBarMouseDownHandler = function () {
@@ -609,15 +590,6 @@ var QuickToolbar = /** @class */ (function () {
609
590
  QuickToolbar.prototype.getModuleName = function () {
610
591
  return 'quickToolbar';
611
592
  };
612
- /**
613
- *
614
- * @returns {BaseQuickToolbar[]} - specifies the quick toolbar instance.
615
- * @hidden
616
- * @private
617
- */
618
- QuickToolbar.prototype.getQuickToolbarInstance = function () {
619
- return [this.linkQTBar, this.imageQTBar, this.audioQTBar, this.videoQTBar, this.tableQTBar, this.textQTBar, this.inlineQTBar];
620
- };
621
593
  return QuickToolbar;
622
594
  }());
623
595
  export { QuickToolbar };
@@ -71,8 +71,7 @@ var Resize = /** @class */ (function () {
71
71
  this.parent.element.style.width = (!this.parent.enableRtl) ? eventType.clientX - boundRect.left + 'px' : boundRect.right - eventType.clientX + 'px';
72
72
  }
73
73
  if (!this.parent.toolbarSettings.enable) {
74
- var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
75
- this.parent.setContentHeight('Resize', isExpand);
74
+ this.parent.setContentHeight('', false);
76
75
  }
77
76
  this.parent.refreshUI();
78
77
  };
@@ -39,7 +39,7 @@ var ToolbarAction = /** @class */ (function () {
39
39
  if (args.item.command === 'Lists') {
40
40
  if (args.originalEvent.target.classList.contains('e-caret') &&
41
41
  (args.originalEvent.target.parentElement.classList.contains('e-rte-bulletformatlist-dropdown') || args.originalEvent.target.parentElement.classList.contains('e-rte-numberformatlist-dropdown'))) {
42
- return;
42
+ args.item.command = args.item.subCommand = null;
43
43
  }
44
44
  }
45
45
  this.parent.notify(events.htmlToolbarClick, args);
@@ -4,7 +4,6 @@ import { IUpdateItemsModel } from '../base/interface';
4
4
  import { ServiceLocator } from '../services/service-locator';
5
5
  import { RendererFactory } from '../services/renderer-factory';
6
6
  import { BaseToolbar } from './base-toolbar';
7
- import { DropDownButtons } from './dropdown-buttons';
8
7
  import { RichTextEditorModel } from '../base/rich-text-editor-model';
9
8
  /**
10
9
  * `Toolbar` module is used to handle Toolbar actions.
@@ -23,7 +22,7 @@ export declare class Toolbar {
23
22
  private isTransformChild;
24
23
  private contentRenderer;
25
24
  protected toolbarRenderer: IRenderer;
26
- dropDownModule: DropDownButtons;
25
+ private dropDownModule;
27
26
  private toolbarActionModule;
28
27
  protected renderFactory: RendererFactory;
29
28
  private keyBoardModule;
@@ -151,6 +150,8 @@ export declare class Toolbar {
151
150
  */
152
151
  destroy(): void;
153
152
  private moduleDestroy;
153
+ private scrollHandler;
154
+ private getDOMVisibility;
154
155
  private mouseDownHandler;
155
156
  private focusChangeHandler;
156
157
  private dropDownBeforeOpenHandler;
@@ -56,9 +56,6 @@ var Toolbar = /** @class */ (function () {
56
56
  if (e.target.classList.contains('e-hor-nav')) {
57
57
  this.adjustContentHeight(e.target, true);
58
58
  }
59
- if (!isNullOrUndefined(e.target) && (e.target.classList.contains("e-rte-fontcolor-dropdown") || e.target.classList.contains("e-rte-backgroundcolor-dropdown"))) {
60
- this.parent.notify(events.showColorPicker, { toolbarClick: e.target.classList.contains("e-rte-fontcolor-dropdown") ? "fontcolor" : "backgroundcolor" });
61
- }
62
59
  }
63
60
  };
64
61
  Toolbar.prototype.createToolbarElement = function () {
@@ -67,7 +64,7 @@ var Toolbar = /** @class */ (function () {
67
64
  return;
68
65
  }
69
66
  else {
70
- if (!this.parent.inlineMode.enable) {
67
+ if (this.parent.toolbarSettings.enableFloating && !this.parent.inlineMode.enable) {
71
68
  this.tbWrapper = this.parent.createElement('div', {
72
69
  id: this.parent.getID() + '_toolbar_wrapper',
73
70
  innerHTML: this.tbElement.outerHTML,
@@ -150,14 +147,72 @@ var Toolbar = /** @class */ (function () {
150
147
  }
151
148
  };
152
149
  Toolbar.prototype.toggleFloatClass = function (e) {
150
+ var topValue;
151
+ var isBody = false;
152
+ var isFloat = false;
153
+ var scrollParent;
153
154
  var floatOffset = this.parent.floatingToolbarOffset;
154
- if (this.parent.toolbarSettings.enableFloating) {
155
- addClass([this.tbElement.parentElement], [classes.CLS_TB_FLOAT]);
156
- setStyleAttribute(this.tbElement.parentElement, { top: (floatOffset) + 'px' });
155
+ if (e && this.parent.iframeSettings.enable && this.parent.inputElement.ownerDocument === e.target) {
156
+ scrollParent = e.target.body;
157
+ }
158
+ else if (e && e.target !== document) {
159
+ scrollParent = e.target;
160
+ }
161
+ else {
162
+ isBody = true;
163
+ scrollParent = document.body;
164
+ }
165
+ var tbHeight = this.getToolbarHeight() + this.getExpandTBarPopHeight();
166
+ if (this.isTransformChild) {
167
+ topValue = 0;
168
+ var scrollParentRelativeTop = 0;
169
+ var trgHeight = this.parent.element.offsetHeight;
170
+ if (isBody) {
171
+ var bodyStyle = window.getComputedStyle(scrollParent);
172
+ scrollParentRelativeTop = parseFloat(bodyStyle.marginTop.split('px')[0]) + parseFloat(bodyStyle.paddingTop.split('px')[0]);
173
+ }
174
+ var targetTop = this.parent.element.getBoundingClientRect().top;
175
+ var scrollParentYOffset = (Browser.isMSPointer && isBody) ? window.pageYOffset : scrollParent.parentElement.scrollTop;
176
+ var scrollParentRect = scrollParent.getBoundingClientRect();
177
+ var scrollParentTop = (!isBody) ? scrollParentRect.top : (scrollParentRect.top + scrollParentYOffset);
178
+ var outOfRange = ((targetTop - ((!isBody) ? scrollParentTop : 0))
179
+ + trgHeight > tbHeight + floatOffset) ? false : true;
180
+ if (targetTop > (scrollParentTop + floatOffset) || targetTop < -trgHeight || ((targetTop < 0) ? outOfRange : false)) {
181
+ isFloat = false;
182
+ removeClass([this.tbElement], [classes.CLS_TB_ABS_FLOAT]);
183
+ }
184
+ else if (targetTop < (scrollParentTop + floatOffset)) {
185
+ if (targetTop < 0) {
186
+ topValue = (-targetTop) + scrollParentTop;
187
+ }
188
+ else {
189
+ topValue = scrollParentTop - targetTop;
190
+ }
191
+ topValue = (isBody) ? topValue - scrollParentRelativeTop : topValue;
192
+ addClass([this.tbElement], [classes.CLS_TB_ABS_FLOAT]);
193
+ isFloat = true;
194
+ }
195
+ }
196
+ else {
197
+ var parent_1 = this.parent.element.getBoundingClientRect();
198
+ if (window.innerHeight < parent_1.top) {
199
+ return;
200
+ }
201
+ topValue = (e && e.target !== document) ? scrollParent.getBoundingClientRect().top : 0;
202
+ if ((parent_1.bottom < (floatOffset + tbHeight + topValue)) || parent_1.bottom < 0 || parent_1.top > floatOffset + topValue) {
203
+ isFloat = false;
204
+ }
205
+ else if (parent_1.top < floatOffset || parent_1.top < floatOffset + topValue) {
206
+ isFloat = true;
207
+ }
208
+ }
209
+ if (!isFloat) {
210
+ removeClass([this.tbElement], [classes.CLS_TB_FLOAT]);
211
+ setStyleAttribute(this.tbElement, { top: 0 + 'px', width: '100%' });
157
212
  }
158
213
  else {
159
- removeClass([this.tbElement.parentElement], [classes.CLS_TB_FLOAT]);
160
- setStyleAttribute(this.tbElement.parentElement, { top: '' });
214
+ addClass([this.tbElement], [classes.CLS_TB_FLOAT]);
215
+ setStyleAttribute(this.tbElement, { width: this.parent.element.offsetWidth + 'px', top: (floatOffset + topValue) + 'px' });
161
216
  }
162
217
  };
163
218
  Toolbar.prototype.renderToolbar = function () {
@@ -463,6 +518,19 @@ var Toolbar = /** @class */ (function () {
463
518
  this.toolbarActionModule.parent = null;
464
519
  this.dropDownModule.parent = null;
465
520
  };
521
+ Toolbar.prototype.scrollHandler = function (e) {
522
+ if (!this.parent.inlineMode.enable) {
523
+ if (this.parent.toolbarSettings.enableFloating && this.getDOMVisibility(this.tbElement)) {
524
+ this.toggleFloatClass(e.args);
525
+ }
526
+ }
527
+ };
528
+ Toolbar.prototype.getDOMVisibility = function (el) {
529
+ if (!el.offsetParent && el.offsetWidth === 0 && el.offsetHeight === 0) {
530
+ return false;
531
+ }
532
+ return true;
533
+ };
466
534
  Toolbar.prototype.mouseDownHandler = function () {
467
535
  if (Browser.isDevice && this.parent.inlineMode.enable && !isIDevice()) {
468
536
  this.showFixedTBar();
@@ -499,6 +567,11 @@ var Toolbar = /** @class */ (function () {
499
567
  };
500
568
  Toolbar.prototype.adjustContentHeight = function (trg, isKeyboard) {
501
569
  if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNOU(trg)) {
570
+ var extendedTbar = this.tbElement.querySelector('.e-toolbar-extended');
571
+ if (!isNOU(extendedTbar)) {
572
+ setStyleAttribute(extendedTbar, { maxHeight: '', display: 'block' });
573
+ setStyleAttribute(extendedTbar, { maxHeight: extendedTbar.offsetHeight + 'px', display: '' });
574
+ }
502
575
  var hasActiveClass = trg.classList.contains('e-nav-active');
503
576
  var isExpand = isKeyboard ? (hasActiveClass ? false : true) : (hasActiveClass ? true : false);
504
577
  if (isExpand) {
@@ -507,12 +580,12 @@ var Toolbar = /** @class */ (function () {
507
580
  else {
508
581
  removeClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
509
582
  }
510
- this.parent.setContentHeight('Toolbar', isExpand);
583
+ this.parent.setContentHeight('toolbar', isExpand);
511
584
  }
512
585
  else if (Browser.isDevice || this.parent.inlineMode.enable) {
513
586
  this.isToolbar = true;
514
587
  }
515
- if (isNOU(trg) && this.parent.toolbarSettings.type === ToolbarType.Expand && this.parent.toolbarModule.getExpandTBarPopHeight() === 0) {
588
+ if (isNOU(trg) && this.parent.toolbarSettings.type === ToolbarType.Expand) {
516
589
  removeClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
517
590
  }
518
591
  };
@@ -532,6 +605,7 @@ var Toolbar = /** @class */ (function () {
532
605
  this.dropDownModule = new DropDownButtons(this.parent, this.locator);
533
606
  this.toolbarActionModule = new ToolbarAction(this.parent);
534
607
  this.parent.on(events.initialEnd, this.renderToolbar, this);
608
+ this.parent.on(events.scroll, this.scrollHandler, this);
535
609
  this.parent.on(events.bindOnEnd, this.toolbarBindEvent, this);
536
610
  this.parent.on(events.toolbarUpdated, this.updateToolbarStatus, this);
537
611
  this.parent.on(events.modelChanged, this.onPropertyChanged, this);
@@ -556,6 +630,7 @@ var Toolbar = /** @class */ (function () {
556
630
  return;
557
631
  }
558
632
  this.parent.off(events.initialEnd, this.renderToolbar);
633
+ this.parent.off(events.scroll, this.scrollHandler);
559
634
  this.parent.off(events.bindOnEnd, this.toolbarBindEvent);
560
635
  this.parent.off(events.toolbarUpdated, this.updateToolbarStatus);
561
636
  this.parent.off(events.modelChanged, this.onPropertyChanged);
@@ -590,8 +665,7 @@ var Toolbar = /** @class */ (function () {
590
665
  if (!this.parent.inlineMode.enable) {
591
666
  this.refreshToolbarOverflow();
592
667
  }
593
- var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
594
- this.parent.setContentHeight('Refresh', isExpand);
668
+ this.parent.setContentHeight('', true);
595
669
  };
596
670
  /**
597
671
  * Called internally if any of the property value changed.
@@ -612,11 +686,6 @@ var Toolbar = /** @class */ (function () {
612
686
  }
613
687
  }
614
688
  }
615
- if (!isNullOrUndefined(e.newProp.toolbarSettings)) {
616
- if (!isNullOrUndefined(e.newProp.toolbarSettings.enableFloating)) {
617
- this.toggleFloatClass();
618
- }
619
- }
620
689
  if (e.module !== this.getModuleName()) {
621
690
  return;
622
691
  }
@@ -46,6 +46,11 @@ export declare const CLS_TB_FIXED: string;
46
46
  * @deprecated
47
47
  */
48
48
  export declare const CLS_TB_FLOAT: string;
49
+ /**
50
+ * @hidden
51
+ * @deprecated
52
+ */
53
+ export declare const CLS_TB_ABS_FLOAT: string;
49
54
  /**
50
55
  * @hidden
51
56
  * @deprecated
@@ -46,6 +46,11 @@ export var CLS_TB_FIXED = 'e-rte-tb-fixed';
46
46
  * @deprecated
47
47
  */
48
48
  export var CLS_TB_FLOAT = 'e-rte-tb-float';
49
+ /**
50
+ * @hidden
51
+ * @deprecated
52
+ */
53
+ export var CLS_TB_ABS_FLOAT = 'e-rte-tb-abs-float';
49
54
  /**
50
55
  * @hidden
51
56
  * @deprecated
@@ -741,31 +741,6 @@ export declare const hidePopup: string;
741
741
  * @deprecated
742
742
  */
743
743
  export declare const cleanupResizeElements: string;
744
- /**
745
- * @hidden
746
- * @deprecated
747
- */
748
- export declare const afterKeyDown: string;
749
- /**
750
- * @hidden
751
- * @deprecated
752
- */
753
- export declare const updateValueOnIdle: string;
754
- /**
755
- * @hidden
756
- * @deprecated
757
- */
758
- export declare const documentClickClosedBy: string;
759
- /**
760
- * @hidden
761
- * @deprecated
762
- */
763
- export declare const showColorPicker: string;
764
- /**
765
- * @hidden
766
- * @deprecated
767
- */
768
- export declare const closeTooltip: string;
769
744
  /**
770
745
  * @hidden
771
746
  * @deprecated
@@ -776,18 +751,3 @@ export declare const blockEmptyNodes: string;
776
751
  * @deprecated
777
752
  */
778
753
  export declare const inlineEmptyNodes: string;
779
- /**
780
- * @hidden
781
- * @deprecated
782
- */
783
- export declare const supportedUnits: string[];
784
- /**
785
- * @hidden
786
- * @deprecated
787
- */
788
- export declare const conversionFactors: Record<string, Record<string, number>>;
789
- /**
790
- * @hidden
791
- * @deprecated
792
- */
793
- export declare const onHandleFontsizeChange: string;
@@ -741,31 +741,6 @@ export var hidePopup = 'hidePopup';
741
741
  * @deprecated
742
742
  */
743
743
  export var cleanupResizeElements = 'cleanupResizeElements';
744
- /**
745
- * @hidden
746
- * @deprecated
747
- */
748
- export var afterKeyDown = 'afterKeyDown';
749
- /**
750
- * @hidden
751
- * @deprecated
752
- */
753
- export var updateValueOnIdle = 'updateValueOnIdle';
754
- /**
755
- * @hidden
756
- * @deprecated
757
- */
758
- export var documentClickClosedBy = 'documentClickClosedBy';
759
- /**
760
- * @hidden
761
- * @deprecated
762
- */
763
- export var showColorPicker = 'showColorPicker';
764
- /**
765
- * @hidden
766
- * @deprecated
767
- */
768
- export var closeTooltip = 'closeTooltip';
769
744
  /**
770
745
  * @hidden
771
746
  * @deprecated
@@ -776,187 +751,3 @@ export var blockEmptyNodes = "address:empty, article:empty, aside:empty, blockqu
776
751
  * @deprecated
777
752
  */
778
753
  export var inlineEmptyNodes = "a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,\ncanvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,\nins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,\nq:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,\ntemplate:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty";
779
- /**
780
- * @hidden
781
- * @deprecated
782
- */
783
- export var supportedUnits = ['px', 'em', 'rem', 'pt', 'cm', 'mm', 'in', 'pc', 'vw', 'vh', 'vmin', 'vmax'];
784
- /**
785
- * @hidden
786
- * @deprecated
787
- */
788
- export var conversionFactors = {
789
- 'px': {
790
- 'px': 1,
791
- 'em': 0.0625,
792
- 'rem': 0.0625,
793
- 'pt': 0.75,
794
- 'cm': 0.0264583,
795
- 'mm': 0.0026458,
796
- 'in': 0.0104167,
797
- 'pc': 0.0625,
798
- 'vw': 0.00625,
799
- 'vh': 0.00625,
800
- 'vmin': 0.00625,
801
- 'vmax': 0.00625
802
- },
803
- 'em': {
804
- 'px': 16,
805
- 'em': 1,
806
- 'rem': 1,
807
- 'pt': 12,
808
- 'cm': 0.423333,
809
- 'mm': 0.0423333,
810
- 'in': 0.166667,
811
- 'pc': 0.0625,
812
- 'vw': 1,
813
- 'vh': 1,
814
- 'vmin': 1,
815
- 'vmax': 1
816
- },
817
- 'rem': {
818
- 'px': 16,
819
- 'em': 1,
820
- 'rem': 1,
821
- 'pt': 12,
822
- 'cm': 0.423333,
823
- 'mm': 0.0423333,
824
- 'in': 0.166667,
825
- 'pc': 0.0625,
826
- 'vw': 1,
827
- 'vh': 1,
828
- 'vmin': 1,
829
- 'vmax': 1
830
- },
831
- 'pt': {
832
- 'px': 1.33333,
833
- 'em': 0.0833333,
834
- 'rem': 0.0833333,
835
- 'pt': 1,
836
- 'cm': 0.0352778,
837
- 'mm': 0.0035278,
838
- 'in': 0.0138889,
839
- 'pc': 0.0416667,
840
- 'vw': 0.00416667,
841
- 'vh': 0.00416667,
842
- 'vmin': 0.00416667,
843
- 'vmax': 0.00416667
844
- },
845
- 'cm': {
846
- 'px': 37.7953,
847
- 'em': 2.3622,
848
- 'rem': 2.3622,
849
- 'pt': 28.3465,
850
- 'cm': 1,
851
- 'mm': 0.1,
852
- 'in': 0.393701,
853
- 'pc': 0.148148,
854
- 'vw': 0.0377953,
855
- 'vh': 0.0377953,
856
- 'vmin': 0.0377953,
857
- 'vmax': 0.0377953
858
- },
859
- 'mm': {
860
- 'px': 3.77953,
861
- 'em': 0.23622,
862
- 'rem': 0.23622,
863
- 'pt': 2.83465,
864
- 'cm': 10,
865
- 'mm': 1,
866
- 'in': 0.0393701,
867
- 'pc': 0.0148148,
868
- 'vw': 0.00377953,
869
- 'vh': 0.00377953,
870
- 'vmin': 0.00377953,
871
- 'vmax': 0.00377953
872
- },
873
- 'in': {
874
- 'px': 96,
875
- 'em': 6,
876
- 'rem': 6,
877
- 'pt': 72,
878
- 'cm': 2.54,
879
- 'mm': 25.4,
880
- 'in': 1,
881
- 'pc': 0.375,
882
- 'vw': 0.09375,
883
- 'vh': 0.09375,
884
- 'vmin': 0.09375,
885
- 'vmax': 0.09375
886
- },
887
- 'pc': {
888
- 'px': 16,
889
- 'em': 1,
890
- 'rem': 1,
891
- 'pt': 12,
892
- 'cm': 0.423333,
893
- 'mm': 0.0423333,
894
- 'in': 0.166667,
895
- 'pc': 1,
896
- 'vw': 0.0625,
897
- 'vh': 0.0625,
898
- 'vmin': 0.0625,
899
- 'vmax': 0.0625
900
- },
901
- 'vw': {
902
- 'px': 160,
903
- 'em': 10,
904
- 'rem': 10,
905
- 'pt': 120,
906
- 'cm': 4.23333,
907
- 'mm': 0.423333,
908
- 'in': 1.66667,
909
- 'pc': 0.625,
910
- 'vw': 1,
911
- 'vh': 1,
912
- 'vmin': 1,
913
- 'vmax': 1
914
- },
915
- 'vh': {
916
- 'px': 160,
917
- 'em': 10,
918
- 'rem': 10,
919
- 'pt': 120,
920
- 'cm': 4.23333,
921
- 'mm': 0.423333,
922
- 'in': 1.66667,
923
- 'pc': 0.625,
924
- 'vw': 1,
925
- 'vh': 1,
926
- 'vmin': 1,
927
- 'vmax': 1
928
- },
929
- 'vmin': {
930
- 'px': 160,
931
- 'em': 10,
932
- 'rem': 10,
933
- 'pt': 120,
934
- 'cm': 4.23333,
935
- 'mm': 0.423333,
936
- 'in': 1.66667,
937
- 'pc': 0.625,
938
- 'vw': 1,
939
- 'vh': 1,
940
- 'vmin': 1,
941
- 'vmax': 1
942
- },
943
- 'vmax': {
944
- 'px': 160,
945
- 'em': 10,
946
- 'rem': 10,
947
- 'pt': 120,
948
- 'cm': 4.23333,
949
- 'mm': 0.423333,
950
- 'in': 1.66667,
951
- 'pc': 0.625,
952
- 'vw': 1,
953
- 'vh': 1,
954
- 'vmin': 1,
955
- 'vmax': 1
956
- }
957
- };
958
- /**
959
- * @hidden
960
- * @deprecated
961
- */
962
- export var onHandleFontsizeChange = 'onHandleFontsizeChange';