@syncfusion/ej2-richtexteditor 23.2.7-52849 → 24.1.41-569781
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 +260 -0
- package/CHANGELOG.md +177 -1
- package/dist/ej2-richtexteditor.umd.min.js +1 -1
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +2919 -1147
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +2906 -1133
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/package.json +13 -13
- 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 +12 -0
- 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/constant.d.ts +6 -0
- package/src/editor-manager/base/constant.js +6 -0
- package/src/editor-manager/base/editor-manager.d.ts +5 -0
- package/src/editor-manager/base/editor-manager.js +59 -0
- package/src/editor-manager/base/interface.d.ts +8 -0
- package/src/editor-manager/plugin/audio.js +13 -3
- package/src/editor-manager/plugin/dom-node.d.ts +5 -1
- package/src/editor-manager/plugin/dom-node.js +169 -28
- package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -0
- package/src/editor-manager/plugin/format-painter-actions.js +19 -1
- package/src/editor-manager/plugin/formats.d.ts +1 -0
- package/src/editor-manager/plugin/formats.js +38 -3
- package/src/editor-manager/plugin/image.js +38 -15
- package/src/editor-manager/plugin/inserthtml.d.ts +1 -0
- package/src/editor-manager/plugin/inserthtml.js +67 -7
- package/src/editor-manager/plugin/link.js +4 -1
- package/src/editor-manager/plugin/lists.js +121 -65
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +3 -0
- package/src/editor-manager/plugin/ms-word-clean-up.js +215 -85
- package/src/editor-manager/plugin/nodecutter.js +2 -2
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -0
- package/src/editor-manager/plugin/selection-commands.js +165 -3
- package/src/editor-manager/plugin/table.d.ts +0 -1
- package/src/editor-manager/plugin/table.js +33 -30
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +20 -10
- package/src/editor-manager/plugin/undo.d.ts +1 -0
- package/src/editor-manager/plugin/undo.js +21 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-quick-toolbar.js +66 -15
- package/src/rich-text-editor/actions/base-toolbar.js +32 -34
- package/src/rich-text-editor/actions/color-picker.d.ts +1 -0
- package/src/rich-text-editor/actions/color-picker.js +13 -3
- package/src/rich-text-editor/actions/count.js +1 -1
- package/src/rich-text-editor/actions/dropdown-buttons.js +25 -4
- package/src/rich-text-editor/actions/emoji-picker.js +15 -6
- package/src/rich-text-editor/actions/enter-key.js +6 -4
- package/src/rich-text-editor/actions/file-manager.js +1 -1
- package/src/rich-text-editor/actions/format-painter.js +1 -1
- package/src/rich-text-editor/actions/full-screen.js +5 -4
- package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
- package/src/rich-text-editor/actions/html-editor.js +127 -17
- package/src/rich-text-editor/actions/keyboard.js +3 -1
- package/src/rich-text-editor/actions/markdown-editor.js +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +5 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +156 -28
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +7 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +45 -11
- 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 +3 -3
- package/src/rich-text-editor/actions/toolbar.js +35 -96
- package/src/rich-text-editor/base/classes.d.ts +5 -5
- package/src/rich-text-editor/base/classes.js +5 -5
- package/src/rich-text-editor/base/constant.d.ts +46 -1
- package/src/rich-text-editor/base/constant.js +215 -1
- package/src/rich-text-editor/base/interface.d.ts +47 -3
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +3 -3
- package/src/rich-text-editor/base/rich-text-editor.d.ts +16 -4
- package/src/rich-text-editor/base/rich-text-editor.js +196 -100
- package/src/rich-text-editor/base/util.d.ts +4 -0
- package/src/rich-text-editor/base/util.js +57 -5
- package/src/rich-text-editor/formatter/formatter.js +15 -4
- package/src/rich-text-editor/models/default-locale.js +31 -25
- package/src/rich-text-editor/models/items.js +3 -3
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +1 -1
- package/src/rich-text-editor/renderer/audio-module.d.ts +1 -0
- package/src/rich-text-editor/renderer/audio-module.js +13 -0
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer/dialog-renderer.js +22 -2
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +2 -1
- package/src/rich-text-editor/renderer/image-module.d.ts +9 -1
- package/src/rich-text-editor/renderer/image-module.js +244 -212
- package/src/rich-text-editor/renderer/link-module.js +53 -24
- package/src/rich-text-editor/renderer/table-module.d.ts +10 -1
- package/src/rich-text-editor/renderer/table-module.js +330 -165
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +4 -6
- package/src/rich-text-editor/renderer/toolbar-renderer.js +105 -106
- package/src/rich-text-editor/renderer/video-module.d.ts +3 -0
- package/src/rich-text-editor/renderer/video-module.js +61 -34
- package/src/rich-text-editor/renderer/view-source.d.ts +1 -0
- package/src/rich-text-editor/renderer/view-source.js +15 -5
- package/src/selection/selection.js +3 -0
- package/styles/bootstrap-dark.css +345 -99
- package/styles/bootstrap.css +353 -108
- package/styles/bootstrap4.css +337 -95
- package/styles/bootstrap5-dark.css +343 -96
- package/styles/bootstrap5.css +343 -96
- package/styles/fabric-dark.css +331 -89
- package/styles/fabric.css +332 -90
- package/styles/fluent-dark.css +342 -92
- package/styles/fluent.css +342 -92
- package/styles/highcontrast-light.css +331 -89
- package/styles/highcontrast.css +335 -90
- package/styles/material-dark.css +337 -90
- package/styles/material.css +337 -90
- package/styles/material3-dark.css +347 -99
- package/styles/material3.css +347 -99
- package/styles/rich-text-editor/_bds-definition.scss +279 -0
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +14 -10
- package/styles/rich-text-editor/_bootstrap-definition.scss +20 -17
- package/styles/rich-text-editor/_bootstrap4-definition.scss +11 -7
- package/styles/rich-text-editor/_bootstrap5-definition.scss +8 -4
- package/styles/rich-text-editor/_fabric-dark-definition.scss +6 -2
- package/styles/rich-text-editor/_fabric-definition.scss +7 -3
- package/styles/rich-text-editor/_fluent-definition.scss +9 -5
- package/styles/rich-text-editor/_fusionnew-definition.scss +7 -3
- package/styles/rich-text-editor/_highcontrast-definition.scss +7 -3
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +6 -2
- package/styles/rich-text-editor/_layout.scss +208 -31
- package/styles/rich-text-editor/_material-dark-definition.scss +6 -2
- package/styles/rich-text-editor/_material-definition.scss +6 -2
- package/styles/rich-text-editor/_material3-definition.scss +16 -12
- package/styles/rich-text-editor/_tailwind-definition.scss +25 -21
- package/styles/rich-text-editor/_theme.scss +93 -24
- package/styles/rich-text-editor/bootstrap-dark.css +345 -99
- package/styles/rich-text-editor/bootstrap.css +353 -108
- package/styles/rich-text-editor/bootstrap4.css +337 -95
- package/styles/rich-text-editor/bootstrap5-dark.css +343 -96
- package/styles/rich-text-editor/bootstrap5.css +343 -96
- package/styles/rich-text-editor/fabric-dark.css +331 -89
- package/styles/rich-text-editor/fabric.css +332 -90
- package/styles/rich-text-editor/fluent-dark.css +342 -92
- package/styles/rich-text-editor/fluent.css +342 -92
- package/styles/rich-text-editor/highcontrast-light.css +331 -89
- package/styles/rich-text-editor/highcontrast.css +335 -90
- package/styles/rich-text-editor/icons/_bds.scss +348 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap4.scss +4 -4
- package/styles/rich-text-editor/icons/_bootstrap5.scss +4 -4
- package/styles/rich-text-editor/icons/_fabric-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_fabric.scss +4 -4
- package/styles/rich-text-editor/icons/_fluent.scss +4 -4
- package/styles/rich-text-editor/icons/_fusionnew.scss +3 -3
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +4 -4
- package/styles/rich-text-editor/icons/_highcontrast.scss +4 -4
- package/styles/rich-text-editor/icons/_material-dark.scss +4 -4
- package/styles/rich-text-editor/icons/_material.scss +4 -4
- package/styles/rich-text-editor/icons/_material3.scss +4 -4
- package/styles/rich-text-editor/icons/_tailwind.scss +4 -4
- package/styles/rich-text-editor/material-dark.css +337 -90
- package/styles/rich-text-editor/material.css +337 -90
- package/styles/rich-text-editor/material3-dark.css +347 -99
- package/styles/rich-text-editor/material3.css +347 -99
- package/styles/rich-text-editor/tailwind-dark.css +386 -116
- package/styles/rich-text-editor/tailwind.css +386 -116
- package/styles/tailwind-dark.css +386 -116
- package/styles/tailwind.css +386 -116
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -41
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -27
- package/src/global.d.ts +0 -1
|
@@ -44,7 +44,7 @@ var ViewSource = /** @class */ (function () {
|
|
|
44
44
|
this.parent.formatter.editorManager.observer.off(CONSTANT.KEY_DOWN_HANDLER, this.onKeyDown);
|
|
45
45
|
};
|
|
46
46
|
ViewSource.prototype.getSourceCode = function () {
|
|
47
|
-
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA +
|
|
47
|
+
return this.parent.createElement('textarea', { className: CLS_RTE_SOURCE_CODE_TXTAREA + this.parent.getCssClass(true) });
|
|
48
48
|
};
|
|
49
49
|
ViewSource.prototype.wireEvent = function (element) {
|
|
50
50
|
this.keyboardModule = new KeyboardEvents(element, {
|
|
@@ -108,6 +108,7 @@ var ViewSource = /** @class */ (function () {
|
|
|
108
108
|
* @deprecated
|
|
109
109
|
*/
|
|
110
110
|
ViewSource.prototype.sourceCode = function (args) {
|
|
111
|
+
var _this = this;
|
|
111
112
|
this.parent.notify(events.hidePopup, {});
|
|
112
113
|
this.parent.isBlur = false;
|
|
113
114
|
this.parent.trigger(events.actionBegin, { requestType: 'SourceCode', targetItem: 'SourceCode', args: args });
|
|
@@ -134,15 +135,16 @@ var ViewSource = /** @class */ (function () {
|
|
|
134
135
|
rteContent.appendChild(this.previewElement);
|
|
135
136
|
this.parent.element.appendChild(rteContent);
|
|
136
137
|
rteContent.style.height = this.contentModule.getPanel().style.height;
|
|
137
|
-
rteContent.style.marginTop = this.contentModule.getPanel().style.marginTop;
|
|
138
138
|
this.getPanel().value = this.getTextAreaValue();
|
|
139
139
|
this.contentModule.getPanel().style.display = 'none';
|
|
140
140
|
rteContent.style.display = 'block';
|
|
141
141
|
this.getPanel().style.display = 'block';
|
|
142
142
|
}
|
|
143
143
|
else {
|
|
144
|
+
var height = this.parent.inputElement.offsetHeight;
|
|
144
145
|
this.contentModule.getPanel().appendChild(this.previewElement);
|
|
145
146
|
this.getPanel().value = this.getTextAreaValue();
|
|
147
|
+
this.previewElement.style.height = height + 'px';
|
|
146
148
|
this.contentModule.getEditPanel().style.display = 'none';
|
|
147
149
|
this.previewElement.style.display = 'block';
|
|
148
150
|
}
|
|
@@ -153,17 +155,23 @@ var ViewSource = /** @class */ (function () {
|
|
|
153
155
|
removeClass([this.parent.getToolbar()], [CLS_EXPAND_OPEN]);
|
|
154
156
|
}
|
|
155
157
|
removeClass(tbItems, [CLS_ACTIVE]);
|
|
156
|
-
this.parent.
|
|
158
|
+
var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
159
|
+
this.parent.setContentHeight('SourceCode', isExpand);
|
|
157
160
|
this.wireEvent(this.previewElement);
|
|
158
161
|
this.unWireBaseKeyDown();
|
|
159
162
|
this.previewElement.focus();
|
|
160
163
|
this.parent.updateValue();
|
|
161
164
|
if (!isNullOrUndefined(this.parent.placeholder) && !this.parent.iframeSettings.enable) {
|
|
162
165
|
var placeHolderWrapper = this.parent.element.querySelector('.rte-placeholder.e-rte-placeholder');
|
|
163
|
-
placeHolderWrapper
|
|
166
|
+
if (placeHolderWrapper) {
|
|
167
|
+
placeHolderWrapper.style.display = 'none';
|
|
168
|
+
}
|
|
164
169
|
}
|
|
165
170
|
this.parent.trigger(events.actionComplete, { requestType: 'SourceCode', targetItem: 'SourceCode', args: args });
|
|
166
171
|
this.parent.invokeChangeEvent();
|
|
172
|
+
if (!isNullOrUndefined(this.parent.saveInterval) && this.parent.saveInterval > 0 && this.parent.autoSaveOnIdle) {
|
|
173
|
+
this.codeViewTimeInterval = setInterval(function () { _this.parent.notify(events.updateValueOnIdle, {}); }, this.parent.saveInterval);
|
|
174
|
+
}
|
|
167
175
|
};
|
|
168
176
|
/**
|
|
169
177
|
* updateSourceCode method
|
|
@@ -213,7 +221,8 @@ var ViewSource = /** @class */ (function () {
|
|
|
213
221
|
if (this.parent.getToolbar()) {
|
|
214
222
|
removeClass([this.parent.getToolbar()], [CLS_EXPAND_OPEN]);
|
|
215
223
|
}
|
|
216
|
-
this.parent.
|
|
224
|
+
var isExpand = this.parent.element.querySelectorAll('.e-toolbar-extended.e-popup-open').length > 0 ? true : false;
|
|
225
|
+
this.parent.setContentHeight('Preview', isExpand);
|
|
217
226
|
this.unWireEvent();
|
|
218
227
|
this.wireBaseKeyDown();
|
|
219
228
|
this.contentModule.getEditPanel().focus();
|
|
@@ -225,6 +234,7 @@ var ViewSource = /** @class */ (function () {
|
|
|
225
234
|
this.parent.trigger(events.actionComplete, { requestType: 'Preview', targetItem: 'Preview', args: args });
|
|
226
235
|
this.parent.formatter.enableUndo(this.parent);
|
|
227
236
|
this.parent.addAudioVideoWrapper();
|
|
237
|
+
clearTimeout(this.codeViewTimeInterval);
|
|
228
238
|
this.parent.invokeChangeEvent();
|
|
229
239
|
this.parent.notify(events.tableclass, {});
|
|
230
240
|
};
|
|
@@ -90,6 +90,9 @@ var NodeSelection = /** @class */ (function () {
|
|
|
90
90
|
|| this.isChildNode(nodeCollection, startNode))) {
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
|
+
if (startNode.nodeType === 3 && startNode.previousSibling === endNode && endNode.nodeName === 'IMG') {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
93
96
|
if (nodeCollection.indexOf(startNode.firstChild) === -1 && startNode.firstChild && !this.isChildNode(nodeCollection, startNode)) {
|
|
94
97
|
return startNode.firstChild;
|
|
95
98
|
}
|