@syncfusion/ej2-richtexteditor 21.1.35 → 21.1.39
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 +2 -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 +36 -23
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +23 -10
- 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/editor-manager/plugin/ms-word-clean-up.js +4 -3
- package/src/editor-manager/plugin/table.js +13 -2
- package/src/editor-manager/plugin/video.js +2 -1
- package/src/rich-text-editor/base/rich-text-editor.js +0 -1
- package/src/rich-text-editor/base/util.js +2 -1
- package/src/rich-text-editor/renderer/image-module.js +2 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.1.
|
|
3
|
+
* version : 21.1.39
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-richtexteditor@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-richtexteditor@
|
|
3
|
+
"_id": "@syncfusion/ej2-richtexteditor@21.1.37",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-XSrMOxnThUk2xWJucy2uDnotxGLRt1zQxT/YELnGJ0eHhWcAl1zWziThdYckBM40LbzfCHjnXf1tYGQXJhZvWQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-richtexteditor",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"/@syncfusion/ej2-react-richtexteditor",
|
|
27
27
|
"/@syncfusion/ej2-vue-richtexteditor"
|
|
28
28
|
],
|
|
29
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
30
|
-
"_shasum": "
|
|
29
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-21.1.37.tgz",
|
|
30
|
+
"_shasum": "f1319ab8be5befb8435594fa6a6cfbcd1a60540c",
|
|
31
31
|
"_spec": "@syncfusion/ej2-richtexteditor@*",
|
|
32
32
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
33
33
|
"author": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"bundleDependencies": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@syncfusion/ej2-base": "~21.1.
|
|
42
|
-
"@syncfusion/ej2-buttons": "~21.1.
|
|
43
|
-
"@syncfusion/ej2-filemanager": "~21.1.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~21.1.
|
|
45
|
-
"@syncfusion/ej2-navigations": "~21.1.
|
|
46
|
-
"@syncfusion/ej2-popups": "~21.1.
|
|
47
|
-
"@syncfusion/ej2-splitbuttons": "~21.1.
|
|
41
|
+
"@syncfusion/ej2-base": "~21.1.39",
|
|
42
|
+
"@syncfusion/ej2-buttons": "~21.1.37",
|
|
43
|
+
"@syncfusion/ej2-filemanager": "~21.1.39",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~21.1.39",
|
|
45
|
+
"@syncfusion/ej2-navigations": "~21.1.39",
|
|
46
|
+
"@syncfusion/ej2-popups": "~21.1.37",
|
|
47
|
+
"@syncfusion/ej2-splitbuttons": "~21.1.37"
|
|
48
48
|
},
|
|
49
49
|
"deprecated": false,
|
|
50
50
|
"description": "Essential JS 2 RichTextEditor component",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
71
71
|
},
|
|
72
72
|
"typings": "index.d.ts",
|
|
73
|
-
"version": "21.1.
|
|
73
|
+
"version": "21.1.39",
|
|
74
74
|
"sideEffects": false
|
|
75
75
|
}
|
|
@@ -123,6 +123,7 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
123
123
|
if (!isNOU(imgElem[i].getAttribute('v:shapes')) &&
|
|
124
124
|
imgElem[i].getAttribute('v:shapes').indexOf('Picture') < 0 &&
|
|
125
125
|
imgElem[i].getAttribute('v:shapes').indexOf('圖片') < 0 &&
|
|
126
|
+
imgElem[i].getAttribute('v:shapes').indexOf('Grafik') < 0 &&
|
|
126
127
|
imgElem[i].getAttribute('v:shapes').indexOf('Image') < 0) {
|
|
127
128
|
detach(imgElem[i]);
|
|
128
129
|
}
|
|
@@ -217,7 +218,7 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
217
218
|
MsWordPaste.prototype.hexConversion = function (rtfData) {
|
|
218
219
|
// eslint-disable-next-line
|
|
219
220
|
var picHead = /\{\\pict[\s\S]+?\\bliptag\-?\d+(\\blipupi\-?\d+)?(\{\\\*\\blipuid\s?[\da-fA-F]+)?[\s\}]*?/;
|
|
220
|
-
// eslint-disable-next-line
|
|
221
|
+
// eslint-disable-next-line
|
|
221
222
|
var pic = new RegExp('(?:(' + picHead.source + '))([\\da-fA-F\\s]+)\\}', 'g');
|
|
222
223
|
var fullImg = rtfData.match(pic);
|
|
223
224
|
var imgType;
|
|
@@ -281,9 +282,9 @@ var MsWordPaste = /** @class */ (function () {
|
|
|
281
282
|
MsWordPaste.prototype.removeUnwantedElements = function (elm) {
|
|
282
283
|
var innerElement = elm.innerHTML;
|
|
283
284
|
for (var i = 0; i < this.removableElements.length; i++) {
|
|
284
|
-
// eslint-disable-next-line
|
|
285
|
+
// eslint-disable-next-line
|
|
285
286
|
var regExpStartElem = new RegExp('<' + this.removableElements[i] + '>', 'g');
|
|
286
|
-
// eslint-disable-next-line
|
|
287
|
+
// eslint-disable-next-line
|
|
287
288
|
var regExpEndElem = new RegExp('</' + this.removableElements[i] + '>', 'g');
|
|
288
289
|
innerElement = innerElement.replace(regExpStartElem, '');
|
|
289
290
|
innerElement = innerElement.replace(regExpEndElem, '');
|
|
@@ -348,8 +348,19 @@ var TableCommand = /** @class */ (function () {
|
|
|
348
348
|
if (j === 0 || allCells[maxI][j] !== allCells[maxI][j - 1]) {
|
|
349
349
|
if (1 < parseInt(allCells[maxI][j].getAttribute('rowspan'), 10)) {
|
|
350
350
|
var rowSpanVal = parseInt(allCells[maxI][j].getAttribute('rowspan'), 10) - 1;
|
|
351
|
-
|
|
352
|
-
1 === rowSpanVal
|
|
351
|
+
/* eslint-disable */
|
|
352
|
+
if (1 === rowSpanVal) {
|
|
353
|
+
allCells[maxI][j].removeAttribute('rowspan');
|
|
354
|
+
var cell = allCells[maxI][j].cloneNode(true);
|
|
355
|
+
allCells = this.getCorrespondingColumns();
|
|
356
|
+
if (allCells[rowSpanVal][j] && allCells[rowSpanVal][j].parentElement) {
|
|
357
|
+
allCells[rowSpanVal][j].parentElement.insertBefore(cell, allCells[rowSpanVal][j]);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
allCells[maxI][j].setAttribute('rowspan', rowSpanVal.toString());
|
|
362
|
+
}
|
|
363
|
+
/* eslint-enable */
|
|
353
364
|
}
|
|
354
365
|
}
|
|
355
366
|
// eslint-disable-next-line max-len
|
|
@@ -161,8 +161,9 @@ var VideoCommand = /** @class */ (function () {
|
|
|
161
161
|
: (Browser.isIE ? selectedNode : !e.item.isEmbedUrl ? selectedNode.lastElementChild : selectedNode.querySelector('iframe'));
|
|
162
162
|
videoElm_1.addEventListener(videoElm_1.tagName !== 'IFRAME' ? 'loadeddata' : 'load', function () {
|
|
163
163
|
if (e.value !== 'VideoReplace' || !isReplaced) {
|
|
164
|
-
if (e.item.isEmbedUrl && videoElm_1)
|
|
164
|
+
if (e.item.isEmbedUrl && videoElm_1) {
|
|
165
165
|
videoElm_1.classList.add('e-rte-embed-url');
|
|
166
|
+
}
|
|
166
167
|
e.callBack({
|
|
167
168
|
requestType: 'Videos',
|
|
168
169
|
editorMode: 'HTML',
|
|
@@ -642,7 +642,6 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
642
642
|
var currentEndContainer = range.endContainer;
|
|
643
643
|
var currentStartOffset = range.startOffset;
|
|
644
644
|
var isSameContainer = currentStartContainer === currentEndContainer ? true : false;
|
|
645
|
-
var currentEndOffset = currentEndContainer.textContent.length;
|
|
646
645
|
var endNode = range.endContainer.nodeName === '#text' ? range.endContainer.parentElement :
|
|
647
646
|
range.endContainer;
|
|
648
647
|
var closestLI = closest(endNode, 'LI');
|
|
@@ -512,8 +512,9 @@ export function decode(value) {
|
|
|
512
512
|
export function sanitizeHelper(value, parent) {
|
|
513
513
|
if (parent.enableHtmlSanitizer) {
|
|
514
514
|
var item = SanitizeHtmlHelper.beforeSanitize();
|
|
515
|
-
if (item.selectors.tags[2] && item.selectors.tags[2].indexOf('iframe') > -1)
|
|
515
|
+
if (item.selectors.tags[2] && item.selectors.tags[2].indexOf('iframe') > -1) {
|
|
516
516
|
item.selectors.tags[2] = 'iframe:not(.e-rte-embed-url)';
|
|
517
|
+
}
|
|
517
518
|
var beforeEvent = {
|
|
518
519
|
cancel: false,
|
|
519
520
|
helper: null
|
|
@@ -349,7 +349,7 @@ var Image = /** @class */ (function () {
|
|
|
349
349
|
if (isNullOrUndefined(img.width)) {
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
|
-
// eslint-disable-next-line
|
|
352
|
+
// eslint-disable-next-line
|
|
353
353
|
var width = img.style.width !== '' ? img.style.width.match(/^\d+(\.\d*)?%$/g) ? parseFloat(img.style.width) :
|
|
354
354
|
parseInt(img.style.width, 10) : img.width;
|
|
355
355
|
var height = img.style.height !== '' ? parseInt(img.style.height, 10) : img.height;
|
|
@@ -387,7 +387,7 @@ var Image = /** @class */ (function () {
|
|
|
387
387
|
img.setAttribute('width', (img.width + this.mouseX).toString());
|
|
388
388
|
}
|
|
389
389
|
else {
|
|
390
|
-
var currentWidth = img.offsetWidth === 0 ? img.width + this.mouseX + parseInt(img.style.outlineWidth.split('p')[0]) : img.offsetWidth + this.mouseX;
|
|
390
|
+
var currentWidth = img.offsetWidth === 0 ? img.width + this.mouseX + parseInt(img.style.outlineWidth.split('p')[0], 10) : img.offsetWidth + this.mouseX;
|
|
391
391
|
img.setAttribute('width', (currentWidth).toString());
|
|
392
392
|
}
|
|
393
393
|
}
|