@syncfusion/ej2-richtexteditor 23.2.7 → 24.1.41-569421
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +259 -259
- package/CHANGELOG.md +1953 -1749
- package/README.md +76 -76
- package/dist/ej2-richtexteditor.umd.min.js +1 -10
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +9971 -8025
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +8445 -6498
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/rte-helper.js +13 -13
- package/license +9 -9
- package/package.json +74 -74
- package/src/common/config.d.ts +7 -0
- package/src/common/config.js +12 -1
- package/src/common/constant.d.ts +6 -0
- package/src/common/constant.js +6 -0
- package/src/common/interface.d.ts +19 -7
- package/src/common/types.d.ts +6 -0
- package/src/common/util.d.ts +6 -0
- package/src/common/util.js +61 -20
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/constant.d.ts +6 -0
- package/src/editor-manager/base/constant.js +6 -0
- package/src/editor-manager/base/editor-manager.d.ts +8 -3
- package/src/editor-manager/base/editor-manager.js +62 -3
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +17 -9
- package/src/editor-manager/base/types.d.ts +1 -1
- package/src/editor-manager/plugin/alignments.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +2 -2
- package/src/editor-manager/plugin/audio.d.ts +3 -3
- package/src/editor-manager/plugin/audio.js +16 -6
- package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
- package/src/editor-manager/plugin/clearformat-exec.js +2 -2
- package/src/editor-manager/plugin/clearformat.d.ts +1 -1
- package/src/editor-manager/plugin/clearformat.js +1 -1
- package/src/editor-manager/plugin/dom-node.d.ts +39 -35
- package/src/editor-manager/plugin/dom-node.js +203 -62
- package/src/editor-manager/plugin/format-painter-actions.d.ts +2 -1
- package/src/editor-manager/plugin/format-painter-actions.js +20 -2
- package/src/editor-manager/plugin/formats.d.ts +3 -2
- package/src/editor-manager/plugin/formats.js +40 -5
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +41 -18
- package/src/editor-manager/plugin/indents.d.ts +2 -2
- package/src/editor-manager/plugin/indents.js +3 -3
- package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
- package/src/editor-manager/plugin/insert-methods.js +4 -4
- package/src/editor-manager/plugin/insert-text.d.ts +2 -2
- package/src/editor-manager/plugin/insert-text.js +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
- package/src/editor-manager/plugin/inserthtml.d.ts +3 -2
- package/src/editor-manager/plugin/inserthtml.js +85 -22
- package/src/editor-manager/plugin/isformatted.d.ts +8 -8
- package/src/editor-manager/plugin/isformatted.js +8 -8
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +10 -5
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +161 -72
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +4 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +216 -86
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +11 -8
- package/src/editor-manager/plugin/selection-commands.d.ts +3 -1
- package/src/editor-manager/plugin/selection-commands.js +249 -5
- package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
- package/src/editor-manager/plugin/selection-exec.js +2 -2
- package/src/editor-manager/plugin/table.d.ts +6 -3
- package/src/editor-manager/plugin/table.js +97 -51
- package/src/editor-manager/plugin/toolbar-status.d.ts +4 -4
- package/src/editor-manager/plugin/toolbar-status.js +22 -12
- package/src/editor-manager/plugin/undo.d.ts +7 -6
- package/src/editor-manager/plugin/undo.js +27 -7
- package/src/editor-manager/plugin/video.d.ts +3 -3
- package/src/editor-manager/plugin/video.js +3 -3
- package/src/global.d.ts +1 -0
- package/src/markdown-parser/base/interface.d.ts +10 -10
- package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
- package/src/markdown-parser/base/markdown-parser.js +3 -3
- package/src/markdown-parser/base/types.d.ts +1 -1
- package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
- package/src/markdown-parser/plugin/clearformat.js +2 -2
- package/src/markdown-parser/plugin/formats.d.ts +2 -2
- package/src/markdown-parser/plugin/formats.js +2 -2
- package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
- package/src/markdown-parser/plugin/insert-text.js +2 -2
- package/src/markdown-parser/plugin/link.d.ts +2 -2
- package/src/markdown-parser/plugin/link.js +2 -2
- package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
- package/src/markdown-parser/plugin/markdown-selection.js +14 -14
- package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
- package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
- package/src/markdown-parser/plugin/table.d.ts +3 -3
- package/src/markdown-parser/plugin/table.js +3 -3
- package/src/markdown-parser/plugin/undo.d.ts +6 -6
- package/src/markdown-parser/plugin/undo.js +6 -6
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +13 -12
- package/src/rich-text-editor/actions/base-quick-toolbar.js +70 -23
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +36 -37
- package/src/rich-text-editor/actions/color-picker.d.ts +3 -2
- package/src/rich-text-editor/actions/color-picker.js +15 -5
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +4 -4
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +3 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +13 -7
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +17 -8
- package/src/rich-text-editor/actions/enter-key.js +10 -5
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +5 -2
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +8 -7
- package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
- package/src/rich-text-editor/actions/html-editor.js +134 -22
- package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +23 -21
- package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
- package/src/rich-text-editor/actions/markdown-editor.js +5 -3
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +6 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +157 -29
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +17 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +68 -21
- package/src/rich-text-editor/actions/resize.js +2 -1
- package/src/rich-text-editor/actions/toolbar-action.js +1 -1
- package/src/rich-text-editor/actions/toolbar.d.ts +16 -16
- package/src/rich-text-editor/actions/toolbar.js +48 -109
- package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/base/classes.d.ts +125 -125
- package/src/rich-text-editor/base/classes.js +125 -125
- package/src/rich-text-editor/base/constant.d.ts +195 -150
- package/src/rich-text-editor/base/constant.js +364 -150
- package/src/rich-text-editor/base/enum.d.ts +1 -1
- package/src/rich-text-editor/base/enum.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +96 -52
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
- package/src/rich-text-editor/base/rich-text-editor.d.ts +76 -64
- package/src/rich-text-editor/base/rich-text-editor.js +247 -160
- package/src/rich-text-editor/base/util.d.ts +1 -1
- package/src/rich-text-editor/base/util.js +23 -5
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +24 -12
- package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/html-formatter.js +15 -15
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
- package/src/rich-text-editor/models/default-locale.js +31 -25
- package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
- package/src/rich-text-editor/models/iframe-settings.js +19 -19
- package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
- package/src/rich-text-editor/models/inline-mode.js +19 -19
- package/src/rich-text-editor/models/items.js +3 -3
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +20 -20
- package/src/rich-text-editor/renderer/audio-module.d.ts +2 -1
- package/src/rich-text-editor/renderer/audio-module.js +23 -5
- package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/content-renderer.js +6 -6
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +4 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +24 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +19 -18
- package/src/rich-text-editor/renderer/image-module.d.ts +10 -2
- package/src/rich-text-editor/renderer/image-module.js +265 -221
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +54 -25
- package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
- package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
- package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
- package/src/rich-text-editor/renderer/render.d.ts +2 -2
- package/src/rich-text-editor/renderer/render.js +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +11 -2
- package/src/rich-text-editor/renderer/table-module.js +344 -169
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +12 -15
- package/src/rich-text-editor/renderer/toolbar-renderer.js +115 -110
- package/src/rich-text-editor/renderer/video-module.d.ts +4 -1
- package/src/rich-text-editor/renderer/video-module.js +83 -42
- package/src/rich-text-editor/renderer/view-source.d.ts +7 -6
- package/src/rich-text-editor/renderer/view-source.js +21 -11
- package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
- package/src/rich-text-editor/services/renderer-factory.js +3 -3
- package/src/rich-text-editor/services/service-locator.d.ts +3 -3
- package/src/rich-text-editor/services/service-locator.js +3 -3
- package/src/selection/selection.d.ts +22 -22
- package/src/selection/selection.js +25 -22
- package/styles/_all.scss +1 -1
- package/styles/bootstrap-dark.css +353 -103
- package/styles/bootstrap.css +357 -112
- package/styles/bootstrap4.css +338 -96
- package/styles/bootstrap5-dark.css +344 -97
- package/styles/bootstrap5.css +344 -97
- package/styles/fabric-dark.css +332 -90
- package/styles/fabric.css +333 -91
- package/styles/fluent-dark.css +360 -98
- package/styles/fluent.css +360 -98
- package/styles/highcontrast-light.css +332 -90
- package/styles/highcontrast.css +336 -91
- package/styles/material-dark.css +339 -92
- package/styles/material.css +339 -92
- package/styles/material3-dark.css +348 -100
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +348 -100
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +281 -277
- package/styles/rich-text-editor/_bootstrap-definition.scss +337 -334
- package/styles/rich-text-editor/_bootstrap4-definition.scss +464 -460
- package/styles/rich-text-editor/_bootstrap5-definition.scss +266 -262
- package/styles/rich-text-editor/_fabric-dark-definition.scss +263 -259
- package/styles/rich-text-editor/_fabric-definition.scss +261 -257
- package/styles/rich-text-editor/_fluent-definition.scss +267 -263
- package/styles/rich-text-editor/_fusionnew-definition.scss +265 -261
- package/styles/rich-text-editor/_highcontrast-definition.scss +261 -257
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +261 -257
- package/styles/rich-text-editor/_layout.scss +2249 -2072
- package/styles/rich-text-editor/_material-dark-definition.scss +266 -262
- package/styles/rich-text-editor/_material-definition.scss +264 -260
- package/styles/rich-text-editor/_material3-definition.scss +266 -262
- package/styles/rich-text-editor/_tailwind-definition.scss +261 -257
- package/styles/rich-text-editor/_theme.scss +926 -837
- package/styles/rich-text-editor/bootstrap-dark.css +353 -103
- package/styles/rich-text-editor/bootstrap.css +357 -112
- package/styles/rich-text-editor/bootstrap4.css +338 -96
- package/styles/rich-text-editor/bootstrap5-dark.css +344 -97
- package/styles/rich-text-editor/bootstrap5.css +344 -97
- package/styles/rich-text-editor/fabric-dark.css +332 -90
- package/styles/rich-text-editor/fabric.css +333 -91
- package/styles/rich-text-editor/fluent-dark.css +360 -98
- package/styles/rich-text-editor/fluent.css +360 -98
- package/styles/rich-text-editor/highcontrast-light.css +332 -90
- package/styles/rich-text-editor/highcontrast.css +336 -91
- package/styles/rich-text-editor/icons/_bds.scss +348 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap4.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap5.scss +348 -348
- package/styles/rich-text-editor/icons/_fabric-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_fabric.scss +349 -349
- package/styles/rich-text-editor/icons/_fluent.scss +348 -348
- package/styles/rich-text-editor/icons/_fusionnew.scss +348 -348
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +349 -349
- package/styles/rich-text-editor/icons/_highcontrast.scss +349 -349
- package/styles/rich-text-editor/icons/_material-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_material.scss +349 -349
- package/styles/rich-text-editor/icons/_material3.scss +348 -348
- package/styles/rich-text-editor/icons/_tailwind.scss +348 -348
- package/styles/rich-text-editor/material-dark.css +339 -92
- package/styles/rich-text-editor/material.css +339 -92
- package/styles/rich-text-editor/material3-dark.css +348 -100
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.css +348 -100
- package/styles/rich-text-editor/material3.scss +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +383 -113
- package/styles/rich-text-editor/tailwind.css +383 -113
- package/styles/tailwind-dark.css +383 -113
- package/styles/tailwind.css +383 -113
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
- package/dist/ej2-richtexteditor.min.js +0 -10
- package/dist/global/ej2-richtexteditor.min.js +0 -11
- package/dist/global/ej2-richtexteditor.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
- package/tslint.json +0 -111
|
@@ -52,6 +52,13 @@ var Toolbar = /** @class */ (function () {
|
|
|
52
52
|
case 'escape':
|
|
53
53
|
this.parent.contentModule.getEditPanel().focus();
|
|
54
54
|
break;
|
|
55
|
+
case 'enter':
|
|
56
|
+
if (e.target.classList.contains('e-hor-nav')) {
|
|
57
|
+
this.adjustContentHeight(e.target, true);
|
|
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
|
+
}
|
|
55
62
|
}
|
|
56
63
|
};
|
|
57
64
|
Toolbar.prototype.createToolbarElement = function () {
|
|
@@ -60,7 +67,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
60
67
|
return;
|
|
61
68
|
}
|
|
62
69
|
else {
|
|
63
|
-
if (
|
|
70
|
+
if (!this.parent.inlineMode.enable) {
|
|
64
71
|
this.tbWrapper = this.parent.createElement('div', {
|
|
65
72
|
id: this.parent.getID() + '_toolbar_wrapper',
|
|
66
73
|
innerHTML: this.tbElement.outerHTML,
|
|
@@ -107,7 +114,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
107
114
|
items: this.parent.toolbarSettings.items,
|
|
108
115
|
mode: tBarMode,
|
|
109
116
|
target: ele,
|
|
110
|
-
cssClass: this.parent.
|
|
117
|
+
cssClass: this.parent.getCssClass()
|
|
111
118
|
});
|
|
112
119
|
if (this.parent.toolbarSettings.type === ToolbarType.Expand) {
|
|
113
120
|
addClass([ele], ['e-rte-tb-mobile']);
|
|
@@ -143,72 +150,14 @@ var Toolbar = /** @class */ (function () {
|
|
|
143
150
|
}
|
|
144
151
|
};
|
|
145
152
|
Toolbar.prototype.toggleFloatClass = function (e) {
|
|
146
|
-
var topValue;
|
|
147
|
-
var isBody = false;
|
|
148
|
-
var isFloat = false;
|
|
149
|
-
var scrollParent;
|
|
150
153
|
var floatOffset = this.parent.floatingToolbarOffset;
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
else if (e && e.target !== document) {
|
|
155
|
-
scrollParent = e.target;
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
isBody = true;
|
|
159
|
-
scrollParent = document.body;
|
|
160
|
-
}
|
|
161
|
-
var tbHeight = this.getToolbarHeight() + this.getExpandTBarPopHeight();
|
|
162
|
-
if (this.isTransformChild) {
|
|
163
|
-
topValue = 0;
|
|
164
|
-
var scrollParentRelativeTop = 0;
|
|
165
|
-
var trgHeight = this.parent.element.offsetHeight;
|
|
166
|
-
if (isBody) {
|
|
167
|
-
var bodyStyle = window.getComputedStyle(scrollParent);
|
|
168
|
-
scrollParentRelativeTop = parseFloat(bodyStyle.marginTop.split('px')[0]) + parseFloat(bodyStyle.paddingTop.split('px')[0]);
|
|
169
|
-
}
|
|
170
|
-
var targetTop = this.parent.element.getBoundingClientRect().top;
|
|
171
|
-
var scrollParentYOffset = (Browser.isMSPointer && isBody) ? window.pageYOffset : scrollParent.parentElement.scrollTop;
|
|
172
|
-
var scrollParentRect = scrollParent.getBoundingClientRect();
|
|
173
|
-
var scrollParentTop = (!isBody) ? scrollParentRect.top : (scrollParentRect.top + scrollParentYOffset);
|
|
174
|
-
var outOfRange = ((targetTop - ((!isBody) ? scrollParentTop : 0))
|
|
175
|
-
+ trgHeight > tbHeight + floatOffset) ? false : true;
|
|
176
|
-
if (targetTop > (scrollParentTop + floatOffset) || targetTop < -trgHeight || ((targetTop < 0) ? outOfRange : false)) {
|
|
177
|
-
isFloat = false;
|
|
178
|
-
removeClass([this.tbElement], [classes.CLS_TB_ABS_FLOAT]);
|
|
179
|
-
}
|
|
180
|
-
else if (targetTop < (scrollParentTop + floatOffset)) {
|
|
181
|
-
if (targetTop < 0) {
|
|
182
|
-
topValue = (-targetTop) + scrollParentTop;
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
topValue = scrollParentTop - targetTop;
|
|
186
|
-
}
|
|
187
|
-
topValue = (isBody) ? topValue - scrollParentRelativeTop : topValue;
|
|
188
|
-
addClass([this.tbElement], [classes.CLS_TB_ABS_FLOAT]);
|
|
189
|
-
isFloat = true;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
var parent_1 = this.parent.element.getBoundingClientRect();
|
|
194
|
-
if (window.innerHeight < parent_1.top) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
topValue = (e && e.target !== document) ? scrollParent.getBoundingClientRect().top : 0;
|
|
198
|
-
if ((parent_1.bottom < (floatOffset + tbHeight + topValue)) || parent_1.bottom < 0 || parent_1.top > floatOffset + topValue) {
|
|
199
|
-
isFloat = false;
|
|
200
|
-
}
|
|
201
|
-
else if (parent_1.top < floatOffset || parent_1.top < floatOffset + topValue) {
|
|
202
|
-
isFloat = true;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
if (!isFloat) {
|
|
206
|
-
removeClass([this.tbElement], [classes.CLS_TB_FLOAT]);
|
|
207
|
-
setStyleAttribute(this.tbElement, { top: 0 + 'px', width: '100%' });
|
|
154
|
+
if (this.parent.toolbarSettings.enableFloating) {
|
|
155
|
+
addClass([this.tbElement.parentElement], [classes.CLS_TB_FLOAT]);
|
|
156
|
+
setStyleAttribute(this.tbElement.parentElement, { top: (floatOffset) + 'px' });
|
|
208
157
|
}
|
|
209
158
|
else {
|
|
210
|
-
|
|
211
|
-
setStyleAttribute(this.tbElement, {
|
|
159
|
+
removeClass([this.tbElement.parentElement], [classes.CLS_TB_FLOAT]);
|
|
160
|
+
setStyleAttribute(this.tbElement.parentElement, { top: '' });
|
|
212
161
|
}
|
|
213
162
|
};
|
|
214
163
|
Toolbar.prototype.renderToolbar = function () {
|
|
@@ -226,7 +175,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
226
175
|
items: this.parent.toolbarSettings.items,
|
|
227
176
|
mode: this.getToolbarMode(),
|
|
228
177
|
target: this.tbElement,
|
|
229
|
-
cssClass: this.parent.
|
|
178
|
+
cssClass: this.parent.getCssClass()
|
|
230
179
|
});
|
|
231
180
|
if (!this.parent.inlineMode.enable) {
|
|
232
181
|
if (this.parent.toolbarSettings.enableFloating) {
|
|
@@ -256,7 +205,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
256
205
|
});
|
|
257
206
|
this.refreshToolbarOverflow();
|
|
258
207
|
}
|
|
259
|
-
var divEle = this.parent.element.querySelector('.
|
|
208
|
+
var divEle = this.parent.element.querySelector('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA);
|
|
260
209
|
var iframeEle = this.parent.element.querySelector('.e-source-content');
|
|
261
210
|
if ((!this.parent.iframeSettings.enable && (!isNOU(divEle) && divEle.style.display === 'block')) ||
|
|
262
211
|
(this.parent.iframeSettings.enable && (!isNOU(iframeEle) && iframeEle.style.display === 'block'))) {
|
|
@@ -272,7 +221,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
272
221
|
*
|
|
273
222
|
* @returns {void}
|
|
274
223
|
* @hidden
|
|
275
|
-
|
|
224
|
+
* @deprecated
|
|
276
225
|
*/
|
|
277
226
|
Toolbar.prototype.addFixedTBarClass = function () {
|
|
278
227
|
addClass([this.tbElement], [classes.CLS_TB_FIXED]);
|
|
@@ -282,7 +231,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
282
231
|
*
|
|
283
232
|
* @returns {void}
|
|
284
233
|
* @hidden
|
|
285
|
-
|
|
234
|
+
* @deprecated
|
|
286
235
|
*/
|
|
287
236
|
Toolbar.prototype.removeFixedTBarClass = function () {
|
|
288
237
|
removeClass([this.tbElement], [classes.CLS_TB_FIXED]);
|
|
@@ -303,7 +252,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
303
252
|
* @param {IUpdateItemsModel} args - specifies the arguments.
|
|
304
253
|
* @returns {void}
|
|
305
254
|
* @hidden
|
|
306
|
-
|
|
255
|
+
* @deprecated
|
|
307
256
|
*/
|
|
308
257
|
Toolbar.prototype.updateItem = function (args) {
|
|
309
258
|
var item = this.tools[args.updateItem.toLocaleLowerCase()];
|
|
@@ -349,7 +298,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
349
298
|
*
|
|
350
299
|
* @returns {void}
|
|
351
300
|
* @hidden
|
|
352
|
-
|
|
301
|
+
* @deprecated
|
|
353
302
|
*/
|
|
354
303
|
Toolbar.prototype.getBaseToolbar = function () {
|
|
355
304
|
return this.baseToolbar;
|
|
@@ -361,7 +310,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
361
310
|
* @param {number} index - specifies the index value.
|
|
362
311
|
* @returns {void}
|
|
363
312
|
* @hidden
|
|
364
|
-
|
|
313
|
+
* @deprecated
|
|
365
314
|
*/
|
|
366
315
|
Toolbar.prototype.addTBarItem = function (args, index) {
|
|
367
316
|
args.baseToolbar.toolbarObj.addItems([args.baseToolbar.getObject(args.updateItem, 'toolbar')], index);
|
|
@@ -375,7 +324,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
375
324
|
* @param {boolean} muteToolbarUpdate - specifies the toolbar.
|
|
376
325
|
* @returns {void}
|
|
377
326
|
* @hidden
|
|
378
|
-
|
|
327
|
+
* @deprecated
|
|
379
328
|
*/
|
|
380
329
|
Toolbar.prototype.enableTBarItems = function (baseToolbar, items, isEnable, muteToolbarUpdate) {
|
|
381
330
|
var trgItems = getTBarItemsIndex(getCollection(items), baseToolbar.toolbarObj.items);
|
|
@@ -386,7 +335,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
386
335
|
baseToolbar.toolbarObj.enableItems(item, isEnable);
|
|
387
336
|
}
|
|
388
337
|
}
|
|
389
|
-
if (!select('.
|
|
338
|
+
if (!select('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element) && !muteToolbarUpdate) {
|
|
390
339
|
updateUndoRedoStatus(baseToolbar, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
391
340
|
}
|
|
392
341
|
};
|
|
@@ -396,7 +345,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
396
345
|
* @param {string} items - specifies the string value.
|
|
397
346
|
* @returns {void}
|
|
398
347
|
* @hidden
|
|
399
|
-
|
|
348
|
+
* @deprecated
|
|
400
349
|
*/
|
|
401
350
|
Toolbar.prototype.removeTBarItems = function (items) {
|
|
402
351
|
if (isNullOrUndefined(this.baseToolbar.toolbarObj)) {
|
|
@@ -414,7 +363,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
414
363
|
*
|
|
415
364
|
* @returns {void}
|
|
416
365
|
* @hidden
|
|
417
|
-
|
|
366
|
+
* @deprecated
|
|
418
367
|
*/
|
|
419
368
|
Toolbar.prototype.getExpandTBarPopHeight = function () {
|
|
420
369
|
var popHeight = 0;
|
|
@@ -437,7 +386,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
437
386
|
*
|
|
438
387
|
* @returns {void}
|
|
439
388
|
* @hidden
|
|
440
|
-
|
|
389
|
+
* @deprecated
|
|
441
390
|
*/
|
|
442
391
|
Toolbar.prototype.getToolbarHeight = function () {
|
|
443
392
|
return this.tbElement.offsetHeight;
|
|
@@ -447,7 +396,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
447
396
|
*
|
|
448
397
|
* @returns {void}
|
|
449
398
|
* @hidden
|
|
450
|
-
|
|
399
|
+
* @deprecated
|
|
451
400
|
*/
|
|
452
401
|
Toolbar.prototype.getToolbarElement = function () {
|
|
453
402
|
return select('.' + classes.CLS_TOOLBAR, this.parent.element);
|
|
@@ -457,7 +406,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
457
406
|
*
|
|
458
407
|
* @returns {void}
|
|
459
408
|
* @hidden
|
|
460
|
-
|
|
409
|
+
* @deprecated
|
|
461
410
|
*/
|
|
462
411
|
Toolbar.prototype.refreshToolbarOverflow = function () {
|
|
463
412
|
this.parent.element.classList.remove(classes.CLS_RTL);
|
|
@@ -495,7 +444,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
495
444
|
* @function destroy
|
|
496
445
|
* @returns {void}
|
|
497
446
|
* @hidden
|
|
498
|
-
|
|
447
|
+
* @deprecated
|
|
499
448
|
*/
|
|
500
449
|
Toolbar.prototype.destroy = function () {
|
|
501
450
|
if (isNOU(this.parent)) {
|
|
@@ -514,19 +463,6 @@ var Toolbar = /** @class */ (function () {
|
|
|
514
463
|
this.toolbarActionModule.parent = null;
|
|
515
464
|
this.dropDownModule.parent = null;
|
|
516
465
|
};
|
|
517
|
-
Toolbar.prototype.scrollHandler = function (e) {
|
|
518
|
-
if (!this.parent.inlineMode.enable) {
|
|
519
|
-
if (this.parent.toolbarSettings.enableFloating && this.getDOMVisibility(this.tbElement)) {
|
|
520
|
-
this.toggleFloatClass(e.args);
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
Toolbar.prototype.getDOMVisibility = function (el) {
|
|
525
|
-
if (!el.offsetParent && el.offsetWidth === 0 && el.offsetHeight === 0) {
|
|
526
|
-
return false;
|
|
527
|
-
}
|
|
528
|
-
return true;
|
|
529
|
-
};
|
|
530
466
|
Toolbar.prototype.mouseDownHandler = function () {
|
|
531
467
|
if (Browser.isDevice && this.parent.inlineMode.enable && !isIDevice()) {
|
|
532
468
|
this.showFixedTBar();
|
|
@@ -559,25 +495,24 @@ var Toolbar = /** @class */ (function () {
|
|
|
559
495
|
};
|
|
560
496
|
Toolbar.prototype.toolbarClickHandler = function (e) {
|
|
561
497
|
var trg = closest(e.originalEvent.target, '.e-hor-nav');
|
|
498
|
+
this.adjustContentHeight(trg, false);
|
|
499
|
+
};
|
|
500
|
+
Toolbar.prototype.adjustContentHeight = function (trg, isKeyboard) {
|
|
562
501
|
if (trg && this.parent.toolbarSettings.type === ToolbarType.Expand && !isNOU(trg)) {
|
|
563
|
-
var
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
}
|
|
568
|
-
if (!trg.classList.contains('e-nav-active')) {
|
|
569
|
-
removeClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
|
|
570
|
-
this.parent.setContentHeight('toolbar', false);
|
|
502
|
+
var hasActiveClass = trg.classList.contains('e-nav-active');
|
|
503
|
+
var isExpand = isKeyboard ? (hasActiveClass ? false : true) : (hasActiveClass ? true : false);
|
|
504
|
+
if (isExpand) {
|
|
505
|
+
addClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
|
|
571
506
|
}
|
|
572
507
|
else {
|
|
573
|
-
|
|
574
|
-
this.parent.setContentHeight('toolbar', true);
|
|
508
|
+
removeClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
|
|
575
509
|
}
|
|
510
|
+
this.parent.setContentHeight('Toolbar', isExpand);
|
|
576
511
|
}
|
|
577
512
|
else if (Browser.isDevice || this.parent.inlineMode.enable) {
|
|
578
513
|
this.isToolbar = true;
|
|
579
514
|
}
|
|
580
|
-
if (isNOU(trg) && this.parent.toolbarSettings.type === ToolbarType.Expand) {
|
|
515
|
+
if (isNOU(trg) && this.parent.toolbarSettings.type === ToolbarType.Expand && this.parent.toolbarModule.getExpandTBarPopHeight() === 0) {
|
|
581
516
|
removeClass([this.tbElement], [classes.CLS_EXPAND_OPEN]);
|
|
582
517
|
}
|
|
583
518
|
};
|
|
@@ -597,7 +532,6 @@ var Toolbar = /** @class */ (function () {
|
|
|
597
532
|
this.dropDownModule = new DropDownButtons(this.parent, this.locator);
|
|
598
533
|
this.toolbarActionModule = new ToolbarAction(this.parent);
|
|
599
534
|
this.parent.on(events.initialEnd, this.renderToolbar, this);
|
|
600
|
-
this.parent.on(events.scroll, this.scrollHandler, this);
|
|
601
535
|
this.parent.on(events.bindOnEnd, this.toolbarBindEvent, this);
|
|
602
536
|
this.parent.on(events.toolbarUpdated, this.updateToolbarStatus, this);
|
|
603
537
|
this.parent.on(events.modelChanged, this.onPropertyChanged, this);
|
|
@@ -622,7 +556,6 @@ var Toolbar = /** @class */ (function () {
|
|
|
622
556
|
return;
|
|
623
557
|
}
|
|
624
558
|
this.parent.off(events.initialEnd, this.renderToolbar);
|
|
625
|
-
this.parent.off(events.scroll, this.scrollHandler);
|
|
626
559
|
this.parent.off(events.bindOnEnd, this.toolbarBindEvent);
|
|
627
560
|
this.parent.off(events.toolbarUpdated, this.updateToolbarStatus);
|
|
628
561
|
this.parent.off(events.modelChanged, this.onPropertyChanged);
|
|
@@ -657,7 +590,8 @@ var Toolbar = /** @class */ (function () {
|
|
|
657
590
|
if (!this.parent.inlineMode.enable) {
|
|
658
591
|
this.refreshToolbarOverflow();
|
|
659
592
|
}
|
|
660
|
-
this.parent.
|
|
593
|
+
var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
594
|
+
this.parent.setContentHeight('Refresh', isExpand);
|
|
661
595
|
};
|
|
662
596
|
/**
|
|
663
597
|
* Called internally if any of the property value changed.
|
|
@@ -665,7 +599,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
665
599
|
* @param {RichTextEditorModel} e - specifies the string value
|
|
666
600
|
* @returns {void}
|
|
667
601
|
* @hidden
|
|
668
|
-
|
|
602
|
+
* @deprecated
|
|
669
603
|
*/
|
|
670
604
|
Toolbar.prototype.onPropertyChanged = function (e) {
|
|
671
605
|
if (!isNullOrUndefined(e.newProp.inlineMode)) {
|
|
@@ -678,6 +612,11 @@ var Toolbar = /** @class */ (function () {
|
|
|
678
612
|
}
|
|
679
613
|
}
|
|
680
614
|
}
|
|
615
|
+
if (!isNullOrUndefined(e.newProp.toolbarSettings)) {
|
|
616
|
+
if (!isNullOrUndefined(e.newProp.toolbarSettings.enableFloating)) {
|
|
617
|
+
this.toggleFloatClass();
|
|
618
|
+
}
|
|
619
|
+
}
|
|
681
620
|
if (e.module !== this.getModuleName()) {
|
|
682
621
|
return;
|
|
683
622
|
}
|
|
@@ -696,7 +635,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
696
635
|
this.addEventListener();
|
|
697
636
|
this.renderToolbar();
|
|
698
637
|
this.parent.wireScrollElementsEvents();
|
|
699
|
-
if (!select('.
|
|
638
|
+
if (!select('.' + classes.CLS_RTE_SOURCE_CODE_TXTAREA, this.parent.element)) {
|
|
700
639
|
updateUndoRedoStatus(this.baseToolbar, this.parent.formatter.editorManager.undoRedoManager.getUndoStatus());
|
|
701
640
|
}
|
|
702
641
|
this.parent.notify(events.dynamicModule, {});
|
|
@@ -13,7 +13,7 @@ export declare class XhtmlValidation {
|
|
|
13
13
|
* @param {string} currentValue - specifies the string value.
|
|
14
14
|
* @param {number} valueLength - specifies the length of the current value.
|
|
15
15
|
* @returns {void}
|
|
16
|
-
|
|
16
|
+
* @deprecated
|
|
17
17
|
*/
|
|
18
18
|
selfEncloseValidation(currentValue: string, valueLength?: number): string;
|
|
19
19
|
private clean;
|
|
@@ -37,7 +37,7 @@ var XhtmlValidation = /** @class */ (function () {
|
|
|
37
37
|
* @param {string} currentValue - specifies the string value.
|
|
38
38
|
* @param {number} valueLength - specifies the length of the current value.
|
|
39
39
|
* @returns {void}
|
|
40
|
-
|
|
40
|
+
* @deprecated
|
|
41
41
|
*/
|
|
42
42
|
XhtmlValidation.prototype.selfEncloseValidation = function (currentValue, valueLength) {
|
|
43
43
|
if (valueLength === 0 && currentValue.indexOf('table') < 0 && currentValue.indexOf('img') < 0 &&
|