@syncfusion/ej2-richtexteditor 24.1.46 → 24.2.3
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/CHANGELOG.md +22 -0
- package/dist/ej2-richtexteditor.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +760 -168
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +769 -167
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/common/constant.d.ts +6 -0
- package/src/common/constant.js +6 -0
- package/src/common/util.js +31 -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/dom-node.js +3 -1
- package/src/editor-manager/plugin/format-painter-actions.js +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +2 -0
- package/src/editor-manager/plugin/ms-word-clean-up.js +39 -10
- package/src/editor-manager/plugin/selection-commands.js +16 -0
- package/src/editor-manager/plugin/table.d.ts +0 -1
- package/src/editor-manager/plugin/table.js +14 -26
- 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.js +3 -0
- package/src/rich-text-editor/actions/base-toolbar.js +8 -4
- package/src/rich-text-editor/actions/count.js +1 -1
- package/src/rich-text-editor/actions/dropdown-buttons.js +21 -2
- package/src/rich-text-editor/actions/emoji-picker.js +1 -1
- package/src/rich-text-editor/actions/full-screen.js +1 -0
- package/src/rich-text-editor/actions/html-editor.d.ts +2 -0
- package/src/rich-text-editor/actions/html-editor.js +88 -4
- package/src/rich-text-editor/actions/keyboard.js +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +1 -0
- package/src/rich-text-editor/actions/paste-clean-up.js +32 -4
- package/src/rich-text-editor/actions/toolbar.d.ts +2 -1
- package/src/rich-text-editor/base/constant.d.ts +30 -0
- package/src/rich-text-editor/base/constant.js +199 -0
- package/src/rich-text-editor/base/interface.d.ts +7 -1
- package/src/rich-text-editor/base/rich-text-editor.d.ts +1 -0
- package/src/rich-text-editor/base/rich-text-editor.js +33 -61
- package/src/rich-text-editor/base/util.d.ts +4 -0
- package/src/rich-text-editor/base/util.js +35 -1
- package/src/rich-text-editor/formatter/formatter.js +15 -4
- package/src/rich-text-editor/models/default-locale.js +12 -12
- package/src/rich-text-editor/models/items.js +2 -2
- 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 +7 -0
- package/src/rich-text-editor/renderer/image-module.d.ts +1 -0
- package/src/rich-text-editor/renderer/image-module.js +20 -2
- package/src/rich-text-editor/renderer/link-module.js +10 -1
- package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/table-module.js +22 -2
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +1 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.js +25 -3
- package/src/rich-text-editor/renderer/video-module.d.ts +1 -0
- package/src/rich-text-editor/renderer/video-module.js +21 -4
- package/src/rich-text-editor/renderer/view-source.d.ts +1 -0
- package/src/rich-text-editor/renderer/view-source.js +5 -0
- package/styles/bootstrap-dark.css +49 -12
- package/styles/bootstrap.css +49 -12
- package/styles/bootstrap4.css +49 -12
- package/styles/bootstrap5-dark.css +49 -12
- package/styles/bootstrap5.css +49 -12
- package/styles/fabric-dark.css +49 -12
- package/styles/fabric.css +49 -12
- package/styles/fluent-dark.css +49 -12
- package/styles/fluent.css +49 -12
- package/styles/highcontrast-light.css +49 -12
- package/styles/highcontrast.css +49 -12
- package/styles/material-dark.css +49 -12
- package/styles/material.css +49 -12
- package/styles/material3-dark.css +56 -19
- package/styles/material3.css +56 -19
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_bootstrap-definition.scss +1 -0
- package/styles/rich-text-editor/_bootstrap4-definition.scss +1 -0
- package/styles/rich-text-editor/_bootstrap5-definition.scss +2 -1
- package/styles/rich-text-editor/_fabric-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_fabric-definition.scss +1 -0
- package/styles/rich-text-editor/_fluent-definition.scss +2 -1
- package/styles/rich-text-editor/_fusionnew-definition.scss +2 -1
- package/styles/rich-text-editor/_highcontrast-definition.scss +1 -0
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +1 -0
- package/styles/rich-text-editor/_layout.scss +40 -5
- package/styles/rich-text-editor/_material-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_material-definition.scss +1 -0
- package/styles/rich-text-editor/_material3-definition.scss +9 -8
- package/styles/rich-text-editor/_tailwind-definition.scss +2 -1
- package/styles/rich-text-editor/_theme.scss +9 -5
- package/styles/rich-text-editor/bootstrap-dark.css +49 -12
- package/styles/rich-text-editor/bootstrap.css +49 -12
- package/styles/rich-text-editor/bootstrap4.css +49 -12
- package/styles/rich-text-editor/bootstrap5-dark.css +49 -12
- package/styles/rich-text-editor/bootstrap5.css +49 -12
- package/styles/rich-text-editor/fabric-dark.css +49 -12
- package/styles/rich-text-editor/fabric.css +49 -12
- package/styles/rich-text-editor/fluent-dark.css +49 -12
- package/styles/rich-text-editor/fluent.css +49 -12
- package/styles/rich-text-editor/highcontrast-light.css +49 -12
- package/styles/rich-text-editor/highcontrast.css +49 -12
- package/styles/rich-text-editor/material-dark.css +49 -12
- package/styles/rich-text-editor/material.css +49 -12
- package/styles/rich-text-editor/material3-dark.css +56 -19
- package/styles/rich-text-editor/material3.css +56 -19
- package/styles/rich-text-editor/tailwind-dark.css +49 -12
- package/styles/rich-text-editor/tailwind.css +49 -12
- package/styles/tailwind-dark.css +49 -12
- package/styles/tailwind.css +49 -12
|
@@ -14,6 +14,7 @@ import { getTextNodesUnder, sanitizeHelper, getDefaultValue } from '../base/util
|
|
|
14
14
|
import { isIDevice } from '../../common/util';
|
|
15
15
|
import { XhtmlValidation } from './xhtml-validation';
|
|
16
16
|
import { ON_BEGIN } from './../../common/constant';
|
|
17
|
+
import * as CONSTANT from '../base/constant';
|
|
17
18
|
/**
|
|
18
19
|
* `HtmlEditor` module is used to HTML editor
|
|
19
20
|
*/
|
|
@@ -70,6 +71,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
70
71
|
this.parent.on(events.readOnlyMode, this.updateReadOnly, this);
|
|
71
72
|
this.parent.on(events.paste, this.onPaste, this);
|
|
72
73
|
this.parent.on(events.tableclass, this.isTableClassAdded, this);
|
|
74
|
+
this.parent.on(events.onHandleFontsizeChange, this.onHandleFontsizeChange, this);
|
|
73
75
|
};
|
|
74
76
|
HtmlEditor.prototype.updateReadOnly = function () {
|
|
75
77
|
if (this.parent.readonly) {
|
|
@@ -88,7 +90,9 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
88
90
|
};
|
|
89
91
|
HtmlEditor.prototype.onSelectionRestore = function (e) {
|
|
90
92
|
this.parent.isBlur = false;
|
|
91
|
-
this.
|
|
93
|
+
if (isNOU(this.saveSelection) || isNOU(closest(this.saveSelection.range.startContainer.parentElement, ".e-img-caption")) ? true : !(closest(this.saveSelection.range.startContainer.parentElement, ".e-img-caption").getAttribute("contenteditable") == "false")) {
|
|
94
|
+
this.contentRenderer.getEditPanel().focus();
|
|
95
|
+
}
|
|
92
96
|
if (isNullOrUndefined(e.items) || e.items) {
|
|
93
97
|
this.saveSelection.restore();
|
|
94
98
|
}
|
|
@@ -96,11 +100,91 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
96
100
|
HtmlEditor.prototype.isTableClassAdded = function () {
|
|
97
101
|
var tableElement = this.parent.inputElement.querySelectorAll('table');
|
|
98
102
|
for (var i = 0; i < tableElement.length; i++) {
|
|
99
|
-
if (!tableElement[i].classList.contains('e-rte-table')) {
|
|
103
|
+
if (!tableElement[i].classList.contains('e-rte-table') && !tableElement[i].classList.contains('e-rte-paste-table')) {
|
|
100
104
|
tableElement[i].classList.add('e-rte-table');
|
|
101
105
|
}
|
|
102
106
|
}
|
|
103
107
|
};
|
|
108
|
+
HtmlEditor.prototype.onHandleFontsizeChange = function (e) {
|
|
109
|
+
var keyboardArgs = e.args;
|
|
110
|
+
var args = { name: 'dropDownSelect' };
|
|
111
|
+
args.item = {
|
|
112
|
+
command: 'Font',
|
|
113
|
+
subCommand: 'FontSize'
|
|
114
|
+
};
|
|
115
|
+
var items = this.parent.fontSize.items;
|
|
116
|
+
var activeElem;
|
|
117
|
+
if (this.parent.toolbarModule && this.parent.toolbarModule.dropDownModule &&
|
|
118
|
+
this.parent.toolbarModule.dropDownModule.fontSizeDropDown && !isNOU(this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent) && this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent !== '') {
|
|
119
|
+
activeElem = this.parent.toolbarModule.dropDownModule.fontSizeDropDown.activeElem[0].textContent;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
var fontSizeValue = void 0;
|
|
123
|
+
var selection = this.parent.contentModule.getDocument().getSelection();
|
|
124
|
+
if (selection && selection.focusNode && selection.focusNode.parentElement) {
|
|
125
|
+
fontSizeValue = document.defaultView.getComputedStyle(selection.focusNode.parentElement, null).getPropertyValue('font-size');
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
fontSizeValue = this.parent.fontSize.width;
|
|
129
|
+
}
|
|
130
|
+
fontSizeValue = isNOU(fontSizeValue) ? this.parent.fontSize.width : fontSizeValue;
|
|
131
|
+
var actualTxtFontValues = fontSizeValue.match(/^([\d.]+)(\D+)$/);
|
|
132
|
+
var size_1 = parseInt(actualTxtFontValues[1], 10);
|
|
133
|
+
var unit = actualTxtFontValues[2];
|
|
134
|
+
var defaultFontValues = items[0].value.match(/^([\d.]+)(\D+)$/);
|
|
135
|
+
if (defaultFontValues[2] === unit) {
|
|
136
|
+
var index = items.findIndex(function (_a) {
|
|
137
|
+
var value = _a.value;
|
|
138
|
+
return parseInt(value, 10) >= size_1;
|
|
139
|
+
});
|
|
140
|
+
activeElem = items[index].text;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
var convertedSize_1 = this.convertFontSize(size_1, unit, defaultFontValues[2]);
|
|
144
|
+
var index = items.findIndex(function (_a) {
|
|
145
|
+
var value = _a.value;
|
|
146
|
+
return parseInt(value, 10) >= convertedSize_1;
|
|
147
|
+
});
|
|
148
|
+
activeElem = items[index].text;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
var fontIndex = items.findIndex(function (size) { return size.text === activeElem; });
|
|
152
|
+
if (keyboardArgs.action === 'increase-fontsize' && fontIndex !== -1) {
|
|
153
|
+
if (fontIndex >= items.length - 1) {
|
|
154
|
+
var fontValues = items[fontIndex].value.match(/^([\d.]+)(\D+)$/);
|
|
155
|
+
if (fontValues) {
|
|
156
|
+
var size = parseInt(fontValues[1], 10);
|
|
157
|
+
var unit = fontValues[2];
|
|
158
|
+
var roundedSize = size % 10 === 0 ? Math.ceil((size + 1) / 10) * 10 : Math.ceil(size / 10) * 10;
|
|
159
|
+
args.item.value = roundedSize.toLocaleString() + unit;
|
|
160
|
+
args.item.text = roundedSize.toLocaleString() + ' ' + unit;
|
|
161
|
+
}
|
|
162
|
+
this.parent.fontSize.items.push(args.item);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
args.item.value = items[fontIndex + 1].value;
|
|
166
|
+
args.item.text = items[fontIndex + 1].text;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
else if (keyboardArgs.action === 'decrease-fontsize' && fontIndex !== -1 && fontIndex > 0) {
|
|
170
|
+
args.item.value = items[fontIndex - 1].value;
|
|
171
|
+
args.item.text = items[fontIndex - 1].text;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
if (fontIndex >= 0 && fontIndex < items.length && items[fontIndex]) {
|
|
175
|
+
args.item.value = items[fontIndex].value;
|
|
176
|
+
args.item.text = items[fontIndex].text;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
this.parent.formatter.process(this.parent, args, keyboardArgs);
|
|
180
|
+
};
|
|
181
|
+
HtmlEditor.prototype.convertFontSize = function (value, originalUnit, targetUnit) {
|
|
182
|
+
if (CONSTANT.supportedUnits.indexOf(originalUnit) !== -1 || CONSTANT.supportedUnits.indexOf(targetUnit) !== -1) {
|
|
183
|
+
originalUnit = 'px';
|
|
184
|
+
}
|
|
185
|
+
var convertedValue = value * CONSTANT.conversionFactors[originalUnit][targetUnit];
|
|
186
|
+
return convertedValue;
|
|
187
|
+
};
|
|
104
188
|
HtmlEditor.prototype.onKeyUp = function (e) {
|
|
105
189
|
var args = e.args;
|
|
106
190
|
var restrictKeys = [8, 9, 13, 16, 17, 18, 20, 27, 37, 38, 39, 40, 44, 45, 46, 91,
|
|
@@ -222,7 +306,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
222
306
|
e.args.keyCode === 13) {
|
|
223
307
|
this.spaceLink(e.args);
|
|
224
308
|
if (this.parent.editorMode === 'HTML' && !this.parent.readonly) {
|
|
225
|
-
var currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length;
|
|
309
|
+
var currentLength = this.parent.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length;
|
|
226
310
|
var selectionLength = this.parent.getSelection().length;
|
|
227
311
|
var totalLength = (currentLength - selectionLength) + 1;
|
|
228
312
|
if (!(this.parent.maxLength === -1 || totalLength <= this.parent.maxLength) &&
|
|
@@ -384,7 +468,7 @@ var HtmlEditor = /** @class */ (function () {
|
|
|
384
468
|
var liElement;
|
|
385
469
|
var rootElement;
|
|
386
470
|
if (e.args.code === 'Delete' && e.args.keyCode === 46 &&
|
|
387
|
-
this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r)/gm, '').replace(/\u200B/g, '').length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
471
|
+
this.parent.contentModule.getText().trim().replace(/(\r\n|\n|\r|\t)/gm, '').replace(/\u200B/g, '').length !== 0 && this.parent.getSelection().length === 0 && currentRange.startContainer.parentElement.tagName !== 'TD' &&
|
|
388
472
|
currentRange.startContainer.parentElement.tagName !== 'TH') {
|
|
389
473
|
this.deleteRangeElement = rootElement = this.getRootBlockNode(currentRange.startContainer);
|
|
390
474
|
if (this.deleteRangeElement.tagName === 'OL' || this.deleteRangeElement.tagName === 'UL') {
|
|
@@ -113,7 +113,8 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
113
113
|
args: e.args,
|
|
114
114
|
text: e.text,
|
|
115
115
|
allowedStylePropertiesArray: this.parent.pasteCleanupSettings.allowedStyleProps,
|
|
116
|
-
callBack: function (a, cropImageData) {
|
|
116
|
+
callBack: function (a, cropImageData, pasteTableSource) {
|
|
117
|
+
args.pasteTableSource = pasteTableSource;
|
|
117
118
|
value = a.trim();
|
|
118
119
|
_this.cropImageData = cropImageData;
|
|
119
120
|
}
|
|
@@ -691,10 +692,24 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
691
692
|
}
|
|
692
693
|
this.parent.trigger(events.afterPasteCleanup, { value: clipBoardElem.innerHTML, filesData: filesData }, function (updatedArgs) { value = updatedArgs.value; });
|
|
693
694
|
clipBoardElem.innerHTML = this.parent.addAnchorAriaLabel(value);
|
|
694
|
-
clipBoardElem = this.addTableClass(clipBoardElem);
|
|
695
|
+
clipBoardElem = this.addTableClass(clipBoardElem, args.pasteTableSource);
|
|
695
696
|
this.parent.formatter.editorManager.execCommand('inserthtml', 'pasteCleanup', args, function (returnArgs) {
|
|
696
697
|
extend(args, { elements: returnArgs.elements, imageElements: returnArgs.imgElem }, true);
|
|
697
698
|
_this.parent.formatter.onSuccess(_this.parent, args);
|
|
699
|
+
if (!isNOU(returnArgs.elements) && !isNOU(returnArgs.imgElem)) {
|
|
700
|
+
var pasteContent = returnArgs.elements;
|
|
701
|
+
var imageContent = returnArgs.imgElem;
|
|
702
|
+
var lastElementChild = _this.findLastElement(pasteContent[pasteContent.length - 1]);
|
|
703
|
+
var isImageAtLast = !isNOU(lastElementChild) ? lastElementChild.nodeName === 'IMG' : false;
|
|
704
|
+
if (isImageAtLast || pasteContent[pasteContent.length - 1] === imageContent[imageContent.length - 1]) {
|
|
705
|
+
_this.parent.notify(events.insertCompleted, {
|
|
706
|
+
args: args.event,
|
|
707
|
+
type: 'Images',
|
|
708
|
+
isNotify: true,
|
|
709
|
+
elements: imageContent[imageContent.length - 1]
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
}
|
|
698
713
|
}, clipBoardElem, null, null, this.parent.enterKey);
|
|
699
714
|
this.removeTempClass();
|
|
700
715
|
this.parent.notify(events.toolbarRefresh, {});
|
|
@@ -749,12 +764,15 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
749
764
|
}
|
|
750
765
|
}
|
|
751
766
|
};
|
|
752
|
-
PasteCleanup.prototype.addTableClass = function (element) {
|
|
767
|
+
PasteCleanup.prototype.addTableClass = function (element, source) {
|
|
753
768
|
var tableElement = element.querySelectorAll('table');
|
|
754
769
|
for (var i = 0; i < tableElement.length; i++) {
|
|
755
|
-
if (!tableElement[i].classList.contains('e-rte-table')) {
|
|
770
|
+
if (!tableElement[i].classList.contains('e-rte-table') && (source === 'html' || source === '')) {
|
|
756
771
|
tableElement[i].classList.add('e-rte-table');
|
|
757
772
|
}
|
|
773
|
+
else if (source && source !== 'html') {
|
|
774
|
+
tableElement[i].classList.add('e-rte-paste-' + source + '-table');
|
|
775
|
+
}
|
|
758
776
|
}
|
|
759
777
|
return element;
|
|
760
778
|
};
|
|
@@ -1089,6 +1107,16 @@ var PasteCleanup = /** @class */ (function () {
|
|
|
1089
1107
|
}
|
|
1090
1108
|
return clipBoardElem;
|
|
1091
1109
|
};
|
|
1110
|
+
PasteCleanup.prototype.findLastElement = function (element) {
|
|
1111
|
+
if (!isNOU(element) && !isNOU(element.lastElementChild)) {
|
|
1112
|
+
var lastChild = element.lastElementChild;
|
|
1113
|
+
while (lastChild && lastChild.lastElementChild) {
|
|
1114
|
+
lastChild = lastChild.lastElementChild;
|
|
1115
|
+
}
|
|
1116
|
+
return lastChild;
|
|
1117
|
+
}
|
|
1118
|
+
return null;
|
|
1119
|
+
};
|
|
1092
1120
|
/**
|
|
1093
1121
|
* For internal use only - Get the module name.
|
|
1094
1122
|
*
|
|
@@ -4,6 +4,7 @@ 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';
|
|
7
8
|
import { RichTextEditorModel } from '../base/rich-text-editor-model';
|
|
8
9
|
/**
|
|
9
10
|
* `Toolbar` module is used to handle Toolbar actions.
|
|
@@ -22,7 +23,7 @@ export declare class Toolbar {
|
|
|
22
23
|
private isTransformChild;
|
|
23
24
|
private contentRenderer;
|
|
24
25
|
protected toolbarRenderer: IRenderer;
|
|
25
|
-
|
|
26
|
+
dropDownModule: DropDownButtons;
|
|
26
27
|
private toolbarActionModule;
|
|
27
28
|
protected renderFactory: RendererFactory;
|
|
28
29
|
private keyBoardModule;
|
|
@@ -744,6 +744,21 @@ export declare const cleanupResizeElements: string;
|
|
|
744
744
|
/**
|
|
745
745
|
* @hidden
|
|
746
746
|
|
|
747
|
+
*/
|
|
748
|
+
export declare const afterKeyDown: string;
|
|
749
|
+
/**
|
|
750
|
+
* @hidden
|
|
751
|
+
|
|
752
|
+
*/
|
|
753
|
+
export declare const updateValueOnIdle: string;
|
|
754
|
+
/**
|
|
755
|
+
* @hidden
|
|
756
|
+
|
|
757
|
+
*/
|
|
758
|
+
export declare const documentClickClosedBy: string;
|
|
759
|
+
/**
|
|
760
|
+
* @hidden
|
|
761
|
+
|
|
747
762
|
*/
|
|
748
763
|
export declare const blockEmptyNodes: string;
|
|
749
764
|
/**
|
|
@@ -751,3 +766,18 @@ export declare const blockEmptyNodes: string;
|
|
|
751
766
|
|
|
752
767
|
*/
|
|
753
768
|
export declare const inlineEmptyNodes: string;
|
|
769
|
+
/**
|
|
770
|
+
* @hidden
|
|
771
|
+
|
|
772
|
+
*/
|
|
773
|
+
export declare const supportedUnits: string[];
|
|
774
|
+
/**
|
|
775
|
+
* @hidden
|
|
776
|
+
|
|
777
|
+
*/
|
|
778
|
+
export declare const conversionFactors: Record<string, Record<string, number>>;
|
|
779
|
+
/**
|
|
780
|
+
* @hidden
|
|
781
|
+
|
|
782
|
+
*/
|
|
783
|
+
export declare const onHandleFontsizeChange: string;
|
|
@@ -744,6 +744,21 @@ export var cleanupResizeElements = 'cleanupResizeElements';
|
|
|
744
744
|
/**
|
|
745
745
|
* @hidden
|
|
746
746
|
|
|
747
|
+
*/
|
|
748
|
+
export var afterKeyDown = 'afterKeyDown';
|
|
749
|
+
/**
|
|
750
|
+
* @hidden
|
|
751
|
+
|
|
752
|
+
*/
|
|
753
|
+
export var updateValueOnIdle = 'updateValueOnIdle';
|
|
754
|
+
/**
|
|
755
|
+
* @hidden
|
|
756
|
+
|
|
757
|
+
*/
|
|
758
|
+
export var documentClickClosedBy = 'documentClickClosedBy';
|
|
759
|
+
/**
|
|
760
|
+
* @hidden
|
|
761
|
+
|
|
747
762
|
*/
|
|
748
763
|
export var blockEmptyNodes = "address:empty, article:empty, aside:empty, blockquote:empty,\n details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,\n h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,\n noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty";
|
|
749
764
|
/**
|
|
@@ -751,3 +766,187 @@ export var blockEmptyNodes = "address:empty, article:empty, aside:empty, blockqu
|
|
|
751
766
|
|
|
752
767
|
*/
|
|
753
768
|
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";
|
|
769
|
+
/**
|
|
770
|
+
* @hidden
|
|
771
|
+
|
|
772
|
+
*/
|
|
773
|
+
export var supportedUnits = ['px', 'em', 'rem', 'pt', 'cm', 'mm', 'in', 'pc', 'vw', 'vh', 'vmin', 'vmax'];
|
|
774
|
+
/**
|
|
775
|
+
* @hidden
|
|
776
|
+
|
|
777
|
+
*/
|
|
778
|
+
export var conversionFactors = {
|
|
779
|
+
'px': {
|
|
780
|
+
'px': 1,
|
|
781
|
+
'em': 0.0625,
|
|
782
|
+
'rem': 0.0625,
|
|
783
|
+
'pt': 0.75,
|
|
784
|
+
'cm': 0.0264583,
|
|
785
|
+
'mm': 0.0026458,
|
|
786
|
+
'in': 0.0104167,
|
|
787
|
+
'pc': 0.0625,
|
|
788
|
+
'vw': 0.00625,
|
|
789
|
+
'vh': 0.00625,
|
|
790
|
+
'vmin': 0.00625,
|
|
791
|
+
'vmax': 0.00625
|
|
792
|
+
},
|
|
793
|
+
'em': {
|
|
794
|
+
'px': 16,
|
|
795
|
+
'em': 1,
|
|
796
|
+
'rem': 1,
|
|
797
|
+
'pt': 12,
|
|
798
|
+
'cm': 0.423333,
|
|
799
|
+
'mm': 0.0423333,
|
|
800
|
+
'in': 0.166667,
|
|
801
|
+
'pc': 0.0625,
|
|
802
|
+
'vw': 1,
|
|
803
|
+
'vh': 1,
|
|
804
|
+
'vmin': 1,
|
|
805
|
+
'vmax': 1
|
|
806
|
+
},
|
|
807
|
+
'rem': {
|
|
808
|
+
'px': 16,
|
|
809
|
+
'em': 1,
|
|
810
|
+
'rem': 1,
|
|
811
|
+
'pt': 12,
|
|
812
|
+
'cm': 0.423333,
|
|
813
|
+
'mm': 0.0423333,
|
|
814
|
+
'in': 0.166667,
|
|
815
|
+
'pc': 0.0625,
|
|
816
|
+
'vw': 1,
|
|
817
|
+
'vh': 1,
|
|
818
|
+
'vmin': 1,
|
|
819
|
+
'vmax': 1
|
|
820
|
+
},
|
|
821
|
+
'pt': {
|
|
822
|
+
'px': 1.33333,
|
|
823
|
+
'em': 0.0833333,
|
|
824
|
+
'rem': 0.0833333,
|
|
825
|
+
'pt': 1,
|
|
826
|
+
'cm': 0.0352778,
|
|
827
|
+
'mm': 0.0035278,
|
|
828
|
+
'in': 0.0138889,
|
|
829
|
+
'pc': 0.0416667,
|
|
830
|
+
'vw': 0.00416667,
|
|
831
|
+
'vh': 0.00416667,
|
|
832
|
+
'vmin': 0.00416667,
|
|
833
|
+
'vmax': 0.00416667
|
|
834
|
+
},
|
|
835
|
+
'cm': {
|
|
836
|
+
'px': 37.7953,
|
|
837
|
+
'em': 2.3622,
|
|
838
|
+
'rem': 2.3622,
|
|
839
|
+
'pt': 28.3465,
|
|
840
|
+
'cm': 1,
|
|
841
|
+
'mm': 0.1,
|
|
842
|
+
'in': 0.393701,
|
|
843
|
+
'pc': 0.148148,
|
|
844
|
+
'vw': 0.0377953,
|
|
845
|
+
'vh': 0.0377953,
|
|
846
|
+
'vmin': 0.0377953,
|
|
847
|
+
'vmax': 0.0377953
|
|
848
|
+
},
|
|
849
|
+
'mm': {
|
|
850
|
+
'px': 3.77953,
|
|
851
|
+
'em': 0.23622,
|
|
852
|
+
'rem': 0.23622,
|
|
853
|
+
'pt': 2.83465,
|
|
854
|
+
'cm': 10,
|
|
855
|
+
'mm': 1,
|
|
856
|
+
'in': 0.0393701,
|
|
857
|
+
'pc': 0.0148148,
|
|
858
|
+
'vw': 0.00377953,
|
|
859
|
+
'vh': 0.00377953,
|
|
860
|
+
'vmin': 0.00377953,
|
|
861
|
+
'vmax': 0.00377953
|
|
862
|
+
},
|
|
863
|
+
'in': {
|
|
864
|
+
'px': 96,
|
|
865
|
+
'em': 6,
|
|
866
|
+
'rem': 6,
|
|
867
|
+
'pt': 72,
|
|
868
|
+
'cm': 2.54,
|
|
869
|
+
'mm': 25.4,
|
|
870
|
+
'in': 1,
|
|
871
|
+
'pc': 0.375,
|
|
872
|
+
'vw': 0.09375,
|
|
873
|
+
'vh': 0.09375,
|
|
874
|
+
'vmin': 0.09375,
|
|
875
|
+
'vmax': 0.09375
|
|
876
|
+
},
|
|
877
|
+
'pc': {
|
|
878
|
+
'px': 16,
|
|
879
|
+
'em': 1,
|
|
880
|
+
'rem': 1,
|
|
881
|
+
'pt': 12,
|
|
882
|
+
'cm': 0.423333,
|
|
883
|
+
'mm': 0.0423333,
|
|
884
|
+
'in': 0.166667,
|
|
885
|
+
'pc': 1,
|
|
886
|
+
'vw': 0.0625,
|
|
887
|
+
'vh': 0.0625,
|
|
888
|
+
'vmin': 0.0625,
|
|
889
|
+
'vmax': 0.0625
|
|
890
|
+
},
|
|
891
|
+
'vw': {
|
|
892
|
+
'px': 160,
|
|
893
|
+
'em': 10,
|
|
894
|
+
'rem': 10,
|
|
895
|
+
'pt': 120,
|
|
896
|
+
'cm': 4.23333,
|
|
897
|
+
'mm': 0.423333,
|
|
898
|
+
'in': 1.66667,
|
|
899
|
+
'pc': 0.625,
|
|
900
|
+
'vw': 1,
|
|
901
|
+
'vh': 1,
|
|
902
|
+
'vmin': 1,
|
|
903
|
+
'vmax': 1
|
|
904
|
+
},
|
|
905
|
+
'vh': {
|
|
906
|
+
'px': 160,
|
|
907
|
+
'em': 10,
|
|
908
|
+
'rem': 10,
|
|
909
|
+
'pt': 120,
|
|
910
|
+
'cm': 4.23333,
|
|
911
|
+
'mm': 0.423333,
|
|
912
|
+
'in': 1.66667,
|
|
913
|
+
'pc': 0.625,
|
|
914
|
+
'vw': 1,
|
|
915
|
+
'vh': 1,
|
|
916
|
+
'vmin': 1,
|
|
917
|
+
'vmax': 1
|
|
918
|
+
},
|
|
919
|
+
'vmin': {
|
|
920
|
+
'px': 160,
|
|
921
|
+
'em': 10,
|
|
922
|
+
'rem': 10,
|
|
923
|
+
'pt': 120,
|
|
924
|
+
'cm': 4.23333,
|
|
925
|
+
'mm': 0.423333,
|
|
926
|
+
'in': 1.66667,
|
|
927
|
+
'pc': 0.625,
|
|
928
|
+
'vw': 1,
|
|
929
|
+
'vh': 1,
|
|
930
|
+
'vmin': 1,
|
|
931
|
+
'vmax': 1
|
|
932
|
+
},
|
|
933
|
+
'vmax': {
|
|
934
|
+
'px': 160,
|
|
935
|
+
'em': 10,
|
|
936
|
+
'rem': 10,
|
|
937
|
+
'pt': 120,
|
|
938
|
+
'cm': 4.23333,
|
|
939
|
+
'mm': 0.423333,
|
|
940
|
+
'in': 1.66667,
|
|
941
|
+
'pc': 0.625,
|
|
942
|
+
'vw': 1,
|
|
943
|
+
'vh': 1,
|
|
944
|
+
'vmin': 1,
|
|
945
|
+
'vmax': 1
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
/**
|
|
949
|
+
* @hidden
|
|
950
|
+
|
|
951
|
+
*/
|
|
952
|
+
export var onHandleFontsizeChange = 'onHandleFontsizeChange';
|
|
@@ -197,6 +197,7 @@ export interface IRichTextEditor extends Component<HTMLElement> {
|
|
|
197
197
|
focusIn(): void;
|
|
198
198
|
showEmojiPicker?(x?: number, y?: number): void;
|
|
199
199
|
addAnchorAriaLabel?(value: string): string;
|
|
200
|
+
autoSaveOnIdle: boolean;
|
|
200
201
|
}
|
|
201
202
|
/**
|
|
202
203
|
|
|
@@ -253,7 +254,7 @@ export interface NotifyArgs {
|
|
|
253
254
|
action?: string;
|
|
254
255
|
callBack?(args?: string | IImageCommandsArgs, cropImageData?: {
|
|
255
256
|
[key: string]: string | boolean | number;
|
|
256
|
-
}[]): void;
|
|
257
|
+
}[], pasteTableSource?: string): void;
|
|
257
258
|
file?: Blob;
|
|
258
259
|
insertElement?: Element;
|
|
259
260
|
touchData?: ITouchData;
|
|
@@ -261,6 +262,11 @@ export interface NotifyArgs {
|
|
|
261
262
|
formatPainterSettings?: FormatPainterSettingsModel;
|
|
262
263
|
emojiPickerSettings?: EmojiSettingsModel;
|
|
263
264
|
ariaLabel?: string;
|
|
265
|
+
/**
|
|
266
|
+
* Defines the source of the Table content.
|
|
267
|
+
* @private
|
|
268
|
+
*/
|
|
269
|
+
pasteTableSource?: string;
|
|
264
270
|
}
|
|
265
271
|
/**
|
|
266
272
|
* Provides information about the current and previous cssClass property .
|