@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.1.35
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@20.13.3",
3
+ "_id": "@syncfusion/ej2-richtexteditor@21.1.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-4jdrmREjDgPKwiANKnB0xje6CtxhXFDBUoNaNL39VS/LTNTc6Vp7eYY6MmUAkkfulvnK99kdaSHCXLbh9hui5g==",
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-release/@syncfusion/ej2-richtexteditor/-/ej2-richtexteditor-20.13.3.tgz",
30
- "_shasum": "00117dbb8de0202c6f23ca3a4d58f3578b21234c",
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.35",
42
- "@syncfusion/ej2-buttons": "~21.1.35",
43
- "@syncfusion/ej2-filemanager": "~21.1.35",
44
- "@syncfusion/ej2-inputs": "~21.1.35",
45
- "@syncfusion/ej2-navigations": "~21.1.35",
46
- "@syncfusion/ej2-popups": "~21.1.35",
47
- "@syncfusion/ej2-splitbuttons": "~21.1.35"
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.35",
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 security/detect-non-literal-regexp
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 security/detect-non-literal-regexp
285
+ // eslint-disable-next-line
285
286
  var regExpStartElem = new RegExp('<' + this.removableElements[i] + '>', 'g');
286
- // eslint-disable-next-line security/detect-non-literal-regexp
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
- //eslint-disable-next-line
352
- 1 === rowSpanVal ? allCells[maxI][j].removeAttribute('rowspan') : allCells[maxI][j].setAttribute('rowspan', rowSpanVal.toString());
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 security/detect-unsafe-regex
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
  }