@syncfusion/ej2-richtexteditor 20.3.61 → 20.4.40
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 +16 -1
- package/CHANGELOG.md +4 -32
- package/README.md +53 -45
- 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 +332 -187
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +320 -174
- 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 +16 -16
- package/src/editor-manager/plugin/clearformat.js +2 -1
- package/src/editor-manager/plugin/dom-node.js +1 -1
- package/src/editor-manager/plugin/formats.js +1 -0
- package/src/editor-manager/plugin/image.js +1 -0
- package/src/editor-manager/plugin/link.js +3 -1
- package/src/editor-manager/plugin/lists.js +15 -7
- package/src/editor-manager/plugin/ms-word-clean-up.js +6 -2
- package/src/editor-manager/plugin/selection-commands.js +8 -41
- package/src/editor-manager/plugin/table.js +6 -0
- package/src/editor-manager/plugin/toolbar-status.js +3 -0
- package/src/editor-manager/plugin/video.js +2 -2
- package/src/markdown-parser/plugin/clearformat.js +9 -7
- package/src/markdown-parser/plugin/formats.js +6 -5
- package/src/markdown-parser/plugin/lists.js +5 -0
- package/src/markdown-parser/plugin/markdown-selection.js +3 -0
- package/src/markdown-parser/plugin/md-selection-formats.js +13 -10
- package/src/rich-text-editor/actions/enter-key.js +66 -15
- package/src/rich-text-editor/actions/file-manager.js +1 -0
- package/src/rich-text-editor/actions/full-screen.js +1 -0
- package/src/rich-text-editor/actions/html-attributes.js +8 -8
- package/src/rich-text-editor/actions/html-editor.js +18 -6
- package/src/rich-text-editor/actions/keyboard.js +4 -4
- package/src/rich-text-editor/actions/markdown-toolbar-status.js +2 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +2 -1
- package/src/rich-text-editor/actions/toolbar.js +6 -1
- package/src/rich-text-editor/base/constant.d.ts +8 -8
- package/src/rich-text-editor/base/constant.js +8 -8
- package/src/rich-text-editor/base/rich-text-editor.d.ts +2 -0
- package/src/rich-text-editor/base/rich-text-editor.js +43 -10
- package/src/rich-text-editor/base/util.js +9 -9
- package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/audio-module.js +7 -5
- package/src/rich-text-editor/renderer/image-module.js +10 -6
- package/src/rich-text-editor/renderer/link-module.js +5 -4
- package/src/rich-text-editor/renderer/table-module.js +19 -5
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +1 -0
- package/src/rich-text-editor/renderer/toolbar-renderer.js +1 -0
- package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/video-module.js +13 -4
- package/src/rich-text-editor/services/renderer-factory.js +4 -4
- package/src/rich-text-editor/services/service-locator.js +4 -4
- package/src/selection/selection.js +2 -0
- package/styles/bootstrap-dark.css +12 -5
- package/styles/bootstrap.css +12 -5
- package/styles/bootstrap4.css +12 -5
- package/styles/bootstrap5-dark.css +12 -5
- package/styles/bootstrap5.css +12 -5
- package/styles/fabric-dark.css +12 -5
- package/styles/fabric.css +12 -5
- package/styles/fluent-dark.css +12 -5
- package/styles/fluent.css +12 -5
- package/styles/highcontrast-light.css +12 -5
- package/styles/highcontrast.css +12 -5
- package/styles/material-dark.css +12 -5
- package/styles/material.css +12 -5
- 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 +1 -0
- 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 +1 -0
- package/styles/rich-text-editor/_fusionnew-definition.scss +1 -0
- 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/_material-dark-definition.scss +1 -0
- package/styles/rich-text-editor/_material-definition.scss +1 -0
- package/styles/rich-text-editor/_material3-definition.scss +1 -0
- package/styles/rich-text-editor/_tailwind-definition.scss +1 -0
- package/styles/rich-text-editor/_theme.scss +11 -6
- package/styles/rich-text-editor/bootstrap-dark.css +12 -5
- package/styles/rich-text-editor/bootstrap.css +12 -5
- package/styles/rich-text-editor/bootstrap4.css +12 -5
- package/styles/rich-text-editor/bootstrap5-dark.css +12 -5
- package/styles/rich-text-editor/bootstrap5.css +12 -5
- package/styles/rich-text-editor/fabric-dark.css +12 -5
- package/styles/rich-text-editor/fabric.css +12 -5
- package/styles/rich-text-editor/fluent-dark.css +12 -5
- package/styles/rich-text-editor/fluent.css +12 -5
- package/styles/rich-text-editor/highcontrast-light.css +12 -5
- package/styles/rich-text-editor/highcontrast.css +12 -5
- package/styles/rich-text-editor/material-dark.css +12 -5
- package/styles/rich-text-editor/material.css +12 -5
- package/styles/rich-text-editor/tailwind-dark.css +12 -5
- package/styles/rich-text-editor/tailwind.css +12 -5
- package/styles/tailwind-dark.css +12 -5
- package/styles/tailwind.css +12 -5
|
@@ -339,7 +339,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
339
339
|
this.focusIn();
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
var tool = executeGroup[commandName];
|
|
342
|
+
var tool = executeGroup["" + commandName];
|
|
343
343
|
if (option && option.undo) {
|
|
344
344
|
if (option.undo && this.formatter.getUndoRedoStack().length === 0) {
|
|
345
345
|
this.formatter.saveData();
|
|
@@ -564,8 +564,10 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
564
564
|
audioElm[i].classList.add('e-rte-audio');
|
|
565
565
|
audioElm[i].classList.add(classes.CLS_AUDIOINLINE);
|
|
566
566
|
}
|
|
567
|
+
// eslint-disable-next-line max-len
|
|
567
568
|
if (!audioElm[i].parentElement.classList.contains(classes.CLS_CLICKELEM) && !audioElm[i].parentElement.classList.contains(classes.CLS_AUDIOWRAP)) {
|
|
568
569
|
var audioWrapElem = this.createElement('span', { className: classes.CLS_AUDIOWRAP });
|
|
570
|
+
audioWrapElem.setAttribute('style', 'width:300px; margin:0 auto;');
|
|
569
571
|
audioWrapElem.contentEditable = 'false';
|
|
570
572
|
var audioInnerWrapElem = this.createElement('span', { className: classes.CLS_CLICKELEM });
|
|
571
573
|
audioWrapElem.appendChild(audioInnerWrapElem);
|
|
@@ -583,6 +585,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
583
585
|
videoElm[i].classList.add('e-rte-video');
|
|
584
586
|
videoElm[i].classList.add(classes.CLS_VIDEOINLINE);
|
|
585
587
|
}
|
|
588
|
+
// eslint-disable-next-line max-len
|
|
586
589
|
if (!videoElm[i].parentElement.classList.contains(classes.CLS_CLICKELEM) && !videoElm[i].parentElement.classList.contains(classes.CLS_VIDEOWRAP)) {
|
|
587
590
|
var videoWrapElem = this.createElement('span', { className: classes.CLS_VIDEOWRAP });
|
|
588
591
|
videoWrapElem.contentEditable = 'false';
|
|
@@ -594,10 +597,12 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
594
597
|
}
|
|
595
598
|
}
|
|
596
599
|
if (Browser.userAgent.indexOf('Firefox') !== -1) {
|
|
600
|
+
// eslint-disable-next-line
|
|
597
601
|
videoElm[i].addEventListener('play', function (args) {
|
|
598
602
|
_this.notify(events.mouseDown, { args: args });
|
|
599
603
|
_this.notify('editAreaClick', { args: args });
|
|
600
604
|
});
|
|
605
|
+
// eslint-disable-next-line
|
|
601
606
|
videoElm[i].addEventListener('pause', function (args) {
|
|
602
607
|
_this.notify(events.mouseDown, { args: args });
|
|
603
608
|
_this.notify('editAreaClick', { args: args });
|
|
@@ -616,6 +621,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
616
621
|
RichTextEditor.prototype.eventInitializer = function () {
|
|
617
622
|
this.wireEvents();
|
|
618
623
|
};
|
|
624
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
619
625
|
RichTextEditor.prototype.cleanList = function (e) {
|
|
620
626
|
var range = this.getRange();
|
|
621
627
|
var currentStartContainer = range.startContainer;
|
|
@@ -663,6 +669,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
663
669
|
if (closest(startNode, 'pre') &&
|
|
664
670
|
(e.which === 8 && range.startContainer.textContent.charCodeAt(range.startOffset - 1) === 8203) ||
|
|
665
671
|
(e.which === 46 && range.startContainer.textContent.charCodeAt(range.startOffset) === 8203)) {
|
|
672
|
+
// eslint-disable-next-line
|
|
666
673
|
var regEx = new RegExp(String.fromCharCode(8203), 'g');
|
|
667
674
|
var pointer = e.which === 8 ? range.startOffset - 1 : range.startOffset;
|
|
668
675
|
range.startContainer.textContent = range.startContainer.textContent.replace(regEx, '');
|
|
@@ -681,6 +688,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
681
688
|
var bool = true;
|
|
682
689
|
var removeNodeArray = [];
|
|
683
690
|
for (i = index; i >= 0; i--) {
|
|
691
|
+
// eslint-disable-next-line max-len
|
|
684
692
|
if (parentEle.childNodes[i].nodeType === 3 && parentEle.childNodes[i].textContent.charCodeAt(0) === 8203 && bool) {
|
|
685
693
|
removeNodeArray.push(i);
|
|
686
694
|
}
|
|
@@ -739,7 +747,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
739
747
|
}
|
|
740
748
|
}
|
|
741
749
|
this.notify(events.keyUp, { member: 'keyup', args: e });
|
|
742
|
-
if (e.keyCode
|
|
750
|
+
if (e.keyCode === 39 || e.keyCode === 37) {
|
|
743
751
|
this.notify(events.tableModulekeyUp, { member: 'tableModulekeyUp', args: e });
|
|
744
752
|
}
|
|
745
753
|
if (e.code === 'KeyX' && e.which === 88 && e.keyCode === 88 && e.ctrlKey && (this.inputElement.innerHTML === '' ||
|
|
@@ -1158,6 +1166,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1158
1166
|
* @hidden
|
|
1159
1167
|
|
|
1160
1168
|
*/
|
|
1169
|
+
/* eslint-disable */
|
|
1161
1170
|
RichTextEditor.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
1162
1171
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
1163
1172
|
var prop = _a[_i];
|
|
@@ -1197,7 +1206,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1197
1206
|
break;
|
|
1198
1207
|
}
|
|
1199
1208
|
case 'valueTemplate':
|
|
1200
|
-
this.setValue();
|
|
1209
|
+
this.setValue(true);
|
|
1201
1210
|
if (this.showCharCount) {
|
|
1202
1211
|
this.countModule.refresh();
|
|
1203
1212
|
}
|
|
@@ -1293,7 +1302,6 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1293
1302
|
this.notify(events.xhtmlValidation, { module: 'XhtmlValidation', newProp: newProp, oldProp: oldProp });
|
|
1294
1303
|
break;
|
|
1295
1304
|
case 'quickToolbarSettings':
|
|
1296
|
-
// eslint-disable-next-line
|
|
1297
1305
|
newProp.quickToolbarSettings.showOnRightClick ? this.wireContextEvent() : this.unWireContextEvent();
|
|
1298
1306
|
this.notify(events.modelChanged, { newProp: newProp, oldProp: oldProp });
|
|
1299
1307
|
break;
|
|
@@ -1303,6 +1311,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1303
1311
|
}
|
|
1304
1312
|
}
|
|
1305
1313
|
};
|
|
1314
|
+
/* eslint-enable */
|
|
1306
1315
|
/**
|
|
1307
1316
|
* @hidden
|
|
1308
1317
|
* @returns {void}
|
|
@@ -1644,7 +1653,8 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1644
1653
|
styleEle.rel = 'stylesheet';
|
|
1645
1654
|
return styleEle;
|
|
1646
1655
|
};
|
|
1647
|
-
RichTextEditor.prototype.setValue = function () {
|
|
1656
|
+
RichTextEditor.prototype.setValue = function (isPropertyChange) {
|
|
1657
|
+
var _this = this;
|
|
1648
1658
|
if (this.valueTemplate) {
|
|
1649
1659
|
var regEx = new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);
|
|
1650
1660
|
if (regEx.test(this.valueTemplate)) {
|
|
@@ -1652,11 +1662,30 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1652
1662
|
}
|
|
1653
1663
|
else {
|
|
1654
1664
|
var compiledTemplate = compile(this.valueTemplate)('', this, 'valueTemplate');
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1665
|
+
if (typeof this.valueTemplate !== 'string' && this.isReact) {
|
|
1666
|
+
this.displayTempElem = this.createElement('div');
|
|
1667
|
+
for (var i = 0; i < compiledTemplate.length; i++) {
|
|
1668
|
+
var item = compiledTemplate[i];
|
|
1669
|
+
append([item], this.displayTempElem);
|
|
1670
|
+
}
|
|
1671
|
+
this.renderTemplates(function () {
|
|
1672
|
+
_this.inputElement.innerHTML = _this.displayTempElem.childNodes[0].innerHTML;
|
|
1673
|
+
_this.setProperties({ value: _this.inputElement.innerHTML.trim() });
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
else {
|
|
1677
|
+
var appendElem = this.element;
|
|
1678
|
+
if (isPropertyChange) {
|
|
1679
|
+
this.inputElement.innerHTML = '';
|
|
1680
|
+
appendElem = this.inputElement;
|
|
1681
|
+
}
|
|
1682
|
+
for (var i = 0; i < compiledTemplate.length; i++) {
|
|
1683
|
+
var item = compiledTemplate[i];
|
|
1684
|
+
append([item], appendElem);
|
|
1685
|
+
}
|
|
1686
|
+
this.setProperties({ value: appendElem.innerHTML.trim() });
|
|
1687
|
+
this.renderReactTemplates();
|
|
1658
1688
|
}
|
|
1659
|
-
this.setProperties({ value: this.element.innerHTML.trim() });
|
|
1660
1689
|
}
|
|
1661
1690
|
}
|
|
1662
1691
|
else {
|
|
@@ -1672,6 +1701,10 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1672
1701
|
}
|
|
1673
1702
|
}
|
|
1674
1703
|
};
|
|
1704
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1705
|
+
RichTextEditor.prototype.renderTemplates = function (callBack) {
|
|
1706
|
+
this.renderReactTemplates(callBack);
|
|
1707
|
+
};
|
|
1675
1708
|
RichTextEditor.prototype.updateResizeFlag = function () {
|
|
1676
1709
|
this.isResizeInitialized = true;
|
|
1677
1710
|
};
|
|
@@ -1741,7 +1774,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1741
1774
|
var rzHandle = this.element.querySelector('.' + classes.CLS_RTE_RES_HANDLE);
|
|
1742
1775
|
var rzHeight = this.enableResize ? (!isNOU(rzHandle) ? (rzHandle.offsetHeight + 8) : 0) : 0;
|
|
1743
1776
|
var expandPopHeight = this.getToolbar() ? this.toolbarModule.getExpandTBarPopHeight() : 0;
|
|
1744
|
-
if (this.toolbarSettings.type === ToolbarType.Expand && isExpand
|
|
1777
|
+
if (this.toolbarSettings.type === ToolbarType.Expand && isExpand) {
|
|
1745
1778
|
heightValue = (this.height === 'auto' && rzHeight === 0) ? 'auto' : rteHeight - (tbHeight + expandPopHeight + rzHeight) + 'px';
|
|
1746
1779
|
topValue = (!this.toolbarSettings.enableFloating) ? expandPopHeight : 0;
|
|
1747
1780
|
}
|
|
@@ -130,7 +130,7 @@ export function pageYOffset(e, parentElement, isIFrame) {
|
|
|
130
130
|
*/
|
|
131
131
|
export function getTooltipText(item, serviceLocator) {
|
|
132
132
|
var i10n = serviceLocator.getService('rteLocale');
|
|
133
|
-
var itemLocale = toolsLocale[item];
|
|
133
|
+
var itemLocale = toolsLocale["" + item];
|
|
134
134
|
var tooltipText = i10n.getConstant(itemLocale);
|
|
135
135
|
return tooltipText;
|
|
136
136
|
}
|
|
@@ -153,17 +153,17 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
153
153
|
var itemStr = item && item.toLocaleLowerCase();
|
|
154
154
|
if (item && (itemStr === key) || (item === 'UL' && key === 'unorderedlist') || (item === 'OL' && key === 'orderedlist') ||
|
|
155
155
|
(itemStr === 'pre' && key === 'insertcode')) {
|
|
156
|
-
if (typeof data[key] === 'boolean') {
|
|
157
|
-
if (data[key] === true) {
|
|
156
|
+
if (typeof data["" + key] === 'boolean') {
|
|
157
|
+
if (data["" + key] === true) {
|
|
158
158
|
addClass([e.tbElements[j]], [classes.CLS_ACTIVE]);
|
|
159
159
|
}
|
|
160
160
|
else {
|
|
161
161
|
removeClass([e.tbElements[j]], [classes.CLS_ACTIVE]);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
else if ((typeof data[key] === 'string' || data[key] === null) &&
|
|
164
|
+
else if ((typeof data["" + key] === 'string' || data["" + key] === null) &&
|
|
165
165
|
getIndex(key, e.parent.toolbarSettings.items) > -1) {
|
|
166
|
-
var value = ((data[key]) ? data[key] : '');
|
|
166
|
+
var value = ((data["" + key]) ? data["" + key] : '');
|
|
167
167
|
var result = '';
|
|
168
168
|
switch (key) {
|
|
169
169
|
case 'formats': {
|
|
@@ -177,7 +177,7 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
177
177
|
result = getDropDownValue(formatItems, value, 'subCommand', 'text');
|
|
178
178
|
dropDown.formatDropDown.content = ('<span style="display: inline-flex;' +
|
|
179
179
|
'width:' + e.parent.format.width + '" >' +
|
|
180
|
-
'<span class="e-rte-dropdown-btn-text' + ' ' + e.parent.cssClass + '">'
|
|
180
|
+
'<span class="e-rte-dropdown-btn-text' + (isNOU(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
|
|
181
181
|
+ (isNOU(result) ? formatContent : result) +
|
|
182
182
|
'</span></span>');
|
|
183
183
|
dropDown.formatDropDown.dataBind();
|
|
@@ -207,7 +207,7 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
207
207
|
e.tbElements[j].title = name_1;
|
|
208
208
|
dropDown.fontNameDropDown.content = ('<span style="display: inline-flex;' +
|
|
209
209
|
'width:' + e.parent.fontFamily.width + '" >' +
|
|
210
|
-
'<span class="e-rte-dropdown-btn-text' + ' ' + e.parent.cssClass + '">'
|
|
210
|
+
'<span class="e-rte-dropdown-btn-text' + (isNOU(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
|
|
211
211
|
+ name_1 + '</span></span>');
|
|
212
212
|
dropDown.fontNameDropDown.dataBind();
|
|
213
213
|
break;
|
|
@@ -223,7 +223,7 @@ export function setToolbarStatus(e, isPopToolbar, self) {
|
|
|
223
223
|
result = getDropDownValue(fontSizeItems, (value === '' ? fontSizeContent.replace(/\s/g, '') : value), 'value', 'text');
|
|
224
224
|
dropDown.fontSizeDropDown.content = ('<span style="display: inline-flex;' +
|
|
225
225
|
'width:' + e.parent.fontSize.width + '" >' +
|
|
226
|
-
'<span class="e-rte-dropdown-btn-text' + ' ' + e.parent.cssClass + '">'
|
|
226
|
+
'<span class="e-rte-dropdown-btn-text' + (isNOU(e.parent.cssClass) ? '' : ' ' + e.parent.cssClass) + '">'
|
|
227
227
|
+ getFormattedFontSize(result) + '</span></span>');
|
|
228
228
|
dropDown.fontSizeDropDown.dataBind();
|
|
229
229
|
break;
|
|
@@ -305,7 +305,7 @@ export function updateUndoRedoStatus(baseToolbar, undoRedoStatus) {
|
|
|
305
305
|
var key = keys_2[_i];
|
|
306
306
|
var target = tbItems[trgItems[i]];
|
|
307
307
|
if (target) {
|
|
308
|
-
baseToolbar.toolbarObj.enableItems(target, undoRedoStatus[key]);
|
|
308
|
+
baseToolbar.toolbarObj.enableItems(target, undoRedoStatus["" + key]);
|
|
309
309
|
}
|
|
310
310
|
i++;
|
|
311
311
|
}
|
|
@@ -48,7 +48,7 @@ export declare class Audio {
|
|
|
48
48
|
private editAreaClickHandler;
|
|
49
49
|
private isAudioElem;
|
|
50
50
|
private showAudioQuickToolbar;
|
|
51
|
-
|
|
51
|
+
hideAudioQuickToolbar(): void;
|
|
52
52
|
private insertingAudio;
|
|
53
53
|
insertAudio(e: IImageNotifyArgs): void;
|
|
54
54
|
private audioUrlPopup;
|
|
@@ -98,6 +98,7 @@ var Audio = /** @class */ (function () {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
101
102
|
Audio.prototype.touchStart = function (e, ele) {
|
|
102
103
|
if (this.parent.readonly) {
|
|
103
104
|
return;
|
|
@@ -304,6 +305,7 @@ var Audio = /** @class */ (function () {
|
|
|
304
305
|
}
|
|
305
306
|
};
|
|
306
307
|
Audio.prototype.audioRemovePost = function (src) {
|
|
308
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
307
309
|
var proxy = this;
|
|
308
310
|
var absoluteUrl = '';
|
|
309
311
|
if (isNOU(this.parent.insertAudioSettings.removeUrl) || this.parent.insertAudioSettings.removeUrl === '') {
|
|
@@ -315,8 +317,9 @@ var Audio = /** @class */ (function () {
|
|
|
315
317
|
else {
|
|
316
318
|
absoluteUrl = new URL(src, document.baseURI).href;
|
|
317
319
|
}
|
|
318
|
-
this.removingAudioName = absoluteUrl.replace(/^.*[
|
|
320
|
+
this.removingAudioName = absoluteUrl.replace(/^.*[\\/]/, '');
|
|
319
321
|
var xhr = new XMLHttpRequest();
|
|
322
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
320
323
|
xhr.addEventListener('readystatechange', function () {
|
|
321
324
|
if (this.readyState === 4 && this.status === 200) {
|
|
322
325
|
proxy.triggerPost(this.response);
|
|
@@ -350,6 +353,7 @@ var Audio = /** @class */ (function () {
|
|
|
350
353
|
}
|
|
351
354
|
}
|
|
352
355
|
if (this.isAudioElem(e.target)) {
|
|
356
|
+
this.audEle = e.target.querySelector('audio');
|
|
353
357
|
e.preventDefault();
|
|
354
358
|
}
|
|
355
359
|
};
|
|
@@ -489,8 +493,6 @@ var Audio = /** @class */ (function () {
|
|
|
489
493
|
addClass([target.querySelector('audio')], [classes.CLS_AUD_FOCUS]);
|
|
490
494
|
target.querySelector('audio').style.outline = '2px solid #4a90e2';
|
|
491
495
|
}
|
|
492
|
-
var pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset +
|
|
493
|
-
this.parent.element.getBoundingClientRect().top + args.clientY : args.pageY;
|
|
494
496
|
if (this.parent.quickToolbarModule.audioQTBar) {
|
|
495
497
|
if (e.isNotify) {
|
|
496
498
|
setTimeout(function () {
|
|
@@ -546,7 +548,7 @@ var Audio = /** @class */ (function () {
|
|
|
546
548
|
cssClass: classes.CLS_RTE_ELEMENTS,
|
|
547
549
|
enableRtl: this.parent.enableRtl,
|
|
548
550
|
locale: this.parent.locale,
|
|
549
|
-
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
551
|
+
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
550
552
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
551
553
|
isModal: Browser.isDevice,
|
|
552
554
|
buttons: [{
|
|
@@ -618,7 +620,7 @@ var Audio = /** @class */ (function () {
|
|
|
618
620
|
var placeUrl = this.i10n.getConstant('audioUrl');
|
|
619
621
|
this.inputUrl = this.parent.createElement('input', {
|
|
620
622
|
className: 'e-input e-audio-url',
|
|
621
|
-
attrs: { placeholder: placeUrl, spellcheck: 'false' }
|
|
623
|
+
attrs: { placeholder: placeUrl, spellcheck: 'false', 'aria-label': this.i10n.getConstant('audioLinkHeader') }
|
|
622
624
|
});
|
|
623
625
|
this.inputUrl.addEventListener('input', function () {
|
|
624
626
|
if (!isNOU(_this.inputUrl)) {
|
|
@@ -107,6 +107,7 @@ var Image = /** @class */ (function () {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
110
111
|
Image.prototype.setCssClass = function (e) {
|
|
111
112
|
if (this.popupObj && e.cssClass) {
|
|
112
113
|
if (isNullOrUndefined(e.oldCssClass)) {
|
|
@@ -300,8 +301,8 @@ var Image = /** @class */ (function () {
|
|
|
300
301
|
var pos = this.calcPos(e);
|
|
301
302
|
var top = pos.top;
|
|
302
303
|
var left = pos.left;
|
|
303
|
-
var imgWid = e.width;
|
|
304
|
-
var imgHgt = e.height;
|
|
304
|
+
var imgWid = e.getBoundingClientRect().width;
|
|
305
|
+
var imgHgt = e.getBoundingClientRect().height;
|
|
305
306
|
var borWid = (Browser.isDevice) ? (4 * parseInt((e.style.outline.slice(-3)), 10)) + 2 :
|
|
306
307
|
(2 * parseInt((e.style.outline.slice(-3)), 10)) + 2; //span border width + image outline width
|
|
307
308
|
var devWid = ((Browser.isDevice) ? 0 : 2); // span border width
|
|
@@ -328,7 +329,6 @@ var Image = /** @class */ (function () {
|
|
|
328
329
|
offsetParent = offsetParent.parentNode;
|
|
329
330
|
}
|
|
330
331
|
if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
|
|
331
|
-
// eslint-disable-next-line
|
|
332
332
|
parentOffset = offsetParent.getBoundingClientRect();
|
|
333
333
|
}
|
|
334
334
|
if (elem.offsetParent && (elem.offsetParent.classList.contains('e-img-caption'))) {
|
|
@@ -349,6 +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
353
|
var width = img.style.width !== '' ? img.style.width.match(/^\d+(\.\d*)?%$/g) ? parseFloat(img.style.width) :
|
|
353
354
|
parseInt(img.style.width, 10) : img.width;
|
|
354
355
|
var height = img.style.height !== '' ? parseInt(img.style.height, 10) : img.height;
|
|
@@ -1149,6 +1150,7 @@ var Image = /** @class */ (function () {
|
|
|
1149
1150
|
}
|
|
1150
1151
|
};
|
|
1151
1152
|
Image.prototype.imageRemovePost = function (src) {
|
|
1153
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1152
1154
|
var proxy = this;
|
|
1153
1155
|
var absoluteUrl = '';
|
|
1154
1156
|
if (isNOU(this.parent.insertImageSettings.removeUrl) || this.parent.insertImageSettings.removeUrl === '') {
|
|
@@ -1160,8 +1162,9 @@ var Image = /** @class */ (function () {
|
|
|
1160
1162
|
else {
|
|
1161
1163
|
absoluteUrl = new URL(src, document.baseURI).href;
|
|
1162
1164
|
}
|
|
1163
|
-
this.removingImgName = absoluteUrl.replace(/^.*[
|
|
1165
|
+
this.removingImgName = absoluteUrl.replace(/^.*[\\/]/, '');
|
|
1164
1166
|
var xhr = new XMLHttpRequest();
|
|
1167
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
1165
1168
|
xhr.addEventListener('readystatechange', function () {
|
|
1166
1169
|
if (this.readyState === 4 && this.status === 200) {
|
|
1167
1170
|
proxy.triggerPost(this.response);
|
|
@@ -1176,6 +1179,7 @@ var Image = /** @class */ (function () {
|
|
|
1176
1179
|
if (isNOU(removeUrl) || removeUrl === '') {
|
|
1177
1180
|
return;
|
|
1178
1181
|
}
|
|
1182
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
1179
1183
|
var file = new File([response], this.removingImgName);
|
|
1180
1184
|
var ajax = new Ajax(removeUrl, 'POST', true, null);
|
|
1181
1185
|
var formData = new FormData();
|
|
@@ -1325,7 +1329,7 @@ var Image = /** @class */ (function () {
|
|
|
1325
1329
|
cssClass: classes.CLS_RTE_ELEMENTS + ' ' + this.parent.cssClass,
|
|
1326
1330
|
enableRtl: this.parent.enableRtl,
|
|
1327
1331
|
locale: this.parent.locale,
|
|
1328
|
-
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
1332
|
+
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
1329
1333
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
1330
1334
|
isModal: Browser.isDevice,
|
|
1331
1335
|
buttons: [{
|
|
@@ -1474,7 +1478,7 @@ var Image = /** @class */ (function () {
|
|
|
1474
1478
|
var placeUrl = this.i10n.getConstant('imageUrl');
|
|
1475
1479
|
this.inputUrl = this.parent.createElement('input', {
|
|
1476
1480
|
className: 'e-input e-img-url' + ' ' + this.parent.cssClass,
|
|
1477
|
-
attrs: { placeholder: placeUrl, spellcheck: 'false' }
|
|
1481
|
+
attrs: { placeholder: placeUrl, spellcheck: 'false', 'aria-label': this.i10n.getConstant('imageLinkHeader') }
|
|
1478
1482
|
});
|
|
1479
1483
|
this.inputUrl.addEventListener('input', function () {
|
|
1480
1484
|
if (!isNOU(_this.inputUrl)) {
|
|
@@ -88,6 +88,7 @@ var Link = /** @class */ (function () {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
91
92
|
Link.prototype.setCssClass = function (e) {
|
|
92
93
|
this.updateCss(this.checkBoxObj, e);
|
|
93
94
|
this.updateCss(this.dialogObj, e);
|
|
@@ -261,13 +262,13 @@ var Link = /** @class */ (function () {
|
|
|
261
262
|
});
|
|
262
263
|
var htmlTextbox = (this.parent.editorMode === 'HTML') ? '<label>' + linkTooltip +
|
|
263
264
|
'</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '">' +
|
|
264
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '" class="e-input e-rte-linkTitle' + ' ' + this.parent.cssClass + '"></div>' +
|
|
265
|
+
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '"aria-label="' + this.i10n.getConstant('linkTitle') + '" class="e-input e-rte-linkTitle' + ' ' + this.parent.cssClass + '"></div>' +
|
|
265
266
|
'<div class="e-rte-label' + ' ' + this.parent.cssClass + '"></div>' + '<div class="e-rte-field' + ' ' + this.parent.cssClass + '">' +
|
|
266
267
|
'<input type="checkbox" class="e-rte-linkTarget' + ' ' + this.parent.cssClass + '" data-role ="none"></div>' : '';
|
|
267
268
|
var content = '<div class="e-rte-label' + ' ' + this.parent.cssClass + '"><label>' + linkWebAddress + '</label></div>' + '<div class="e-rte-field' + ' ' + this.parent.cssClass + '">' +
|
|
268
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '" class="e-input e-rte-linkurl' + ' ' + this.parent.cssClass + '"/></div>' +
|
|
269
|
+
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '"aria-label="' + this.i10n.getConstant('linkWebUrl') + '" class="e-input e-rte-linkurl' + ' ' + this.parent.cssClass + '"/></div>' +
|
|
269
270
|
'<div class="e-rte-label' + ' ' + this.parent.cssClass + '">' + '<label>' + linkDisplayText + '</label></div><div class="e-rte-field' + ' ' + this.parent.cssClass + '"> ' +
|
|
270
|
-
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' + ' ' + this.parent.cssClass + '" placeholder="' + textPlace + '">' +
|
|
271
|
+
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' + ' ' + this.parent.cssClass + '"aria-label="' + this.i10n.getConstant('linkText') + '" placeholder="' + textPlace + '">' +
|
|
271
272
|
'</div><div class="e-rte-label' + ' ' + this.parent.cssClass + '">' + htmlTextbox;
|
|
272
273
|
var contentElem = parseHtml(content);
|
|
273
274
|
linkContent.appendChild(contentElem);
|
|
@@ -293,7 +294,7 @@ var Link = /** @class */ (function () {
|
|
|
293
294
|
cssClass: CLS_RTE_ELEMENTS + ' ' + this.parent.cssClass,
|
|
294
295
|
enableRtl: this.parent.enableRtl,
|
|
295
296
|
locale: this.parent.locale,
|
|
296
|
-
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
297
|
+
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
297
298
|
isModal: Browser.isDevice,
|
|
298
299
|
buttons: [{
|
|
299
300
|
click: this.insertlink.bind(selectObj),
|
|
@@ -79,6 +79,7 @@ var Table = /** @class */ (function () {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
82
83
|
Table.prototype.setCssClass = function (e) {
|
|
83
84
|
if (this.popupObj && e.cssClass) {
|
|
84
85
|
if (isNullOrUndefined(e.oldCssClass)) {
|
|
@@ -211,18 +212,17 @@ var Table = /** @class */ (function () {
|
|
|
211
212
|
}
|
|
212
213
|
}
|
|
213
214
|
};
|
|
215
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
214
216
|
Table.prototype.tableModulekeyUp = function (e) {
|
|
215
|
-
var event = e.args;
|
|
216
217
|
if (!isNullOrUndefined(this.parent.formatter.editorManager.nodeSelection) && this.contentModule) {
|
|
217
218
|
var range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
218
|
-
var selection = this.parent.formatter.editorManager.nodeSelection.save(range, this.contentModule.getDocument());
|
|
219
219
|
var ele = this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(range)[0];
|
|
220
220
|
ele = (ele && ele.tagName !== 'TD' && ele.tagName !== 'TH') ? ele.parentElement : ele;
|
|
221
221
|
if (ele && ele.tagName !== 'TD' && ele.tagName !== 'TH') {
|
|
222
222
|
var closestTd = closest(ele, 'td');
|
|
223
223
|
ele = !isNullOrUndefined(closestTd) && this.parent.inputElement.contains(closestTd) ? closestTd : ele;
|
|
224
224
|
}
|
|
225
|
-
if (this.previousTableElement
|
|
225
|
+
if (this.previousTableElement !== ele && !isNullOrUndefined(this.previousTableElement)) {
|
|
226
226
|
this.previousTableElement.classList.remove(classes.CLS_TABLE_SEL);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
@@ -651,7 +651,6 @@ var Table = /** @class */ (function () {
|
|
|
651
651
|
top: 0,
|
|
652
652
|
left: 0
|
|
653
653
|
};
|
|
654
|
-
// eslint-disable-next-line
|
|
655
654
|
var offset = elem.getBoundingClientRect();
|
|
656
655
|
var doc = elem.ownerDocument;
|
|
657
656
|
var offsetParent = elem.offsetParent || doc.documentElement;
|
|
@@ -666,7 +665,6 @@ var Table = /** @class */ (function () {
|
|
|
666
665
|
isNestedTable = true;
|
|
667
666
|
}
|
|
668
667
|
if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
|
|
669
|
-
// eslint-disable-next-line
|
|
670
668
|
parentOffset = offsetParent.getBoundingClientRect();
|
|
671
669
|
}
|
|
672
670
|
if (isNestedTable) {
|
|
@@ -835,6 +833,8 @@ var Table = /** @class */ (function () {
|
|
|
835
833
|
var mouseY = (this.parent.enableRtl) ? -(pageY - this.pageY) : (pageY - this.pageY);
|
|
836
834
|
this.pageX = pageX;
|
|
837
835
|
this.pageY = pageY;
|
|
836
|
+
var maxiumWidth;
|
|
837
|
+
var currentTdElement = this.curTable.closest('td');
|
|
838
838
|
var args = { event: e, requestType: 'table' };
|
|
839
839
|
this.parent.trigger(events.onResize, args, function (resizingArgs) {
|
|
840
840
|
if (resizingArgs.cancel) {
|
|
@@ -867,6 +867,10 @@ var Table = /** @class */ (function () {
|
|
|
867
867
|
if (_this.currentColumnResize === 'first') {
|
|
868
868
|
mouseX = mouseX - 0.75; //This was done for to make the gripper and the table first/last column will be close.
|
|
869
869
|
_this.removeResizeElement();
|
|
870
|
+
if (currentTdElement) {
|
|
871
|
+
maxiumWidth = _this.curTable.getBoundingClientRect().right - _this.calcPos(currentTdElement).left;
|
|
872
|
+
_this.curTable.style.maxWidth = maxiumWidth + 'px';
|
|
873
|
+
}
|
|
870
874
|
// Below the value '100' is the 100% width of the parent element.
|
|
871
875
|
if (((mouseX !== 0 && 5 < currentColumnCellWidth) || mouseX < 0) && currentTableWidth <= 100 &&
|
|
872
876
|
_this.convertPixelToPercentage(tableWidth - mouseX, widthCompare) <= 100) {
|
|
@@ -884,6 +888,10 @@ var Table = /** @class */ (function () {
|
|
|
884
888
|
else if (_this.currentColumnResize === 'last') {
|
|
885
889
|
mouseX = mouseX + 0.75; //This was done for to make the gripper and the table first/last column will be close.
|
|
886
890
|
_this.removeResizeElement();
|
|
891
|
+
if (currentTdElement) {
|
|
892
|
+
maxiumWidth = currentTdElement.getBoundingClientRect().right - _this.curTable.getBoundingClientRect().left;
|
|
893
|
+
_this.curTable.style.maxWidth = maxiumWidth + 'px';
|
|
894
|
+
}
|
|
887
895
|
// Below the value '100' is the 100% width of the parent element.
|
|
888
896
|
if (((mouseX !== 0 && 5 < currentColumnCellWidth) || mouseX > 0) &&
|
|
889
897
|
currentTableWidth <= 100 && _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) <= 100) {
|
|
@@ -934,6 +942,12 @@ var Table = /** @class */ (function () {
|
|
|
934
942
|
if (!Browser.isDevice) {
|
|
935
943
|
EventHandler.remove(_this.contentModule.getEditPanel(), 'mouseover', _this.resizeHelper);
|
|
936
944
|
}
|
|
945
|
+
if (currentTdElement) {
|
|
946
|
+
// eslint-disable-next-line max-len
|
|
947
|
+
var tableBoxPosition = _this.curTable.getBoundingClientRect().left - currentTdElement.getBoundingClientRect().left;
|
|
948
|
+
maxiumWidth = Math.abs(tableBoxPosition - currentTdElement.getBoundingClientRect().width) - 5;
|
|
949
|
+
_this.curTable.style.maxWidth = maxiumWidth + 'px';
|
|
950
|
+
}
|
|
937
951
|
var widthType = _this.curTable.style.width.indexOf('%') > -1;
|
|
938
952
|
_this.curTable.style.width = widthType ? _this.convertPixelToPercentage(tableWidth + mouseX, widthCompare) + '%'
|
|
939
953
|
: tableWidth + mouseX + 'px';
|
|
@@ -72,6 +72,7 @@ export declare class ToolbarRenderer implements IRenderer {
|
|
|
72
72
|
* @param {IColorPickerModel} args - specifies the arguments.
|
|
73
73
|
* @param {string} item - specifies the item.
|
|
74
74
|
* @param {ColorPicker} colorPicker - specifies the colorpicker.
|
|
75
|
+
* @param {string} defaultColor -specifies the defaultColor.
|
|
75
76
|
* @returns {void}
|
|
76
77
|
* @hidden
|
|
77
78
|
|
|
@@ -286,6 +286,7 @@ var ToolbarRenderer = /** @class */ (function () {
|
|
|
286
286
|
* @param {IColorPickerModel} args - specifies the arguments.
|
|
287
287
|
* @param {string} item - specifies the item.
|
|
288
288
|
* @param {ColorPicker} colorPicker - specifies the colorpicker.
|
|
289
|
+
* @param {string} defaultColor -specifies the defaultColor.
|
|
289
290
|
* @returns {void}
|
|
290
291
|
* @hidden
|
|
291
292
|
|
|
@@ -76,7 +76,7 @@ export declare class Video {
|
|
|
76
76
|
private alignVideo;
|
|
77
77
|
private editAreaClickHandler;
|
|
78
78
|
private showVideoQuickToolbar;
|
|
79
|
-
|
|
79
|
+
hideVideoQuickToolbar(): void;
|
|
80
80
|
private isEmbedVidElem;
|
|
81
81
|
private insertingVideo;
|
|
82
82
|
insertVideo(e: IImageNotifyArgs): void;
|
|
@@ -385,7 +385,6 @@ var Video = /** @class */ (function () {
|
|
|
385
385
|
offsetParent = offsetParent.parentNode;
|
|
386
386
|
}
|
|
387
387
|
if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
|
|
388
|
-
// eslint-disable-next-line
|
|
389
388
|
parentOffset = offsetParent.getBoundingClientRect();
|
|
390
389
|
}
|
|
391
390
|
if (elem && elem.nodeType === 1 && elem.tagName === 'IFRAME') {
|
|
@@ -407,6 +406,7 @@ var Video = /** @class */ (function () {
|
|
|
407
406
|
if (isNullOrUndefined(vidEleStyle)) {
|
|
408
407
|
return;
|
|
409
408
|
}
|
|
409
|
+
// eslint-disable-next-line
|
|
410
410
|
var width = vidEleStyle.width !== '' ? vidEleStyle.width.match(/^\d+(\.\d*)?%$/g) ? parseFloat(vidEleStyle.width) :
|
|
411
411
|
parseInt(vidEleStyle.width, 10) : vid.style.width !== '' ? vid.style.width : vid.width;
|
|
412
412
|
var height = vidEleStyle.height !== '' ? parseInt(vidEleStyle.height, 10) : vid.style.height !== '' ? vid.style.height : vid.height;
|
|
@@ -805,6 +805,7 @@ var Video = /** @class */ (function () {
|
|
|
805
805
|
}
|
|
806
806
|
};
|
|
807
807
|
Video.prototype.videoRemovePost = function (src) {
|
|
808
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
808
809
|
var proxy = this;
|
|
809
810
|
var absoluteUrl = '';
|
|
810
811
|
if (isNOU(this.parent.insertVideoSettings.removeUrl) || this.parent.insertVideoSettings.removeUrl === '') {
|
|
@@ -816,8 +817,10 @@ var Video = /** @class */ (function () {
|
|
|
816
817
|
else {
|
|
817
818
|
absoluteUrl = new URL(src, document.baseURI).href;
|
|
818
819
|
}
|
|
820
|
+
// eslint-disable-next-line no-useless-escape
|
|
819
821
|
this.removingVideoName = absoluteUrl.replace(/^.*[\\\/]/, '');
|
|
820
822
|
var xhr = new XMLHttpRequest();
|
|
823
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
821
824
|
xhr.addEventListener('readystatechange', function () {
|
|
822
825
|
if (this.readyState === 4 && this.status === 200) {
|
|
823
826
|
proxy.triggerPost(this.response);
|
|
@@ -948,7 +951,7 @@ var Video = /** @class */ (function () {
|
|
|
948
951
|
};
|
|
949
952
|
Video.prototype.showVideoQuickToolbar = function (e) {
|
|
950
953
|
var _this = this;
|
|
951
|
-
if (e.type !== 'Videos' || isNullOrUndefined(this.parent.quickToolbarModule)
|
|
954
|
+
if (e.type !== 'Videos' || e.args.detail === 2 || isNullOrUndefined(this.parent.quickToolbarModule)
|
|
952
955
|
|| isNullOrUndefined(this.parent.quickToolbarModule.videoQTBar) || isNullOrUndefined(e.args)) {
|
|
953
956
|
return;
|
|
954
957
|
}
|
|
@@ -981,6 +984,12 @@ var Video = /** @class */ (function () {
|
|
|
981
984
|
Video.prototype.hideVideoQuickToolbar = function () {
|
|
982
985
|
if (!isNullOrUndefined(this.contentModule.getEditPanel().querySelector('.' + classes.CLS_VID_FOCUS))) {
|
|
983
986
|
removeClass([this.contentModule.getEditPanel().querySelector('.' + classes.CLS_VID_FOCUS)], classes.CLS_VID_FOCUS);
|
|
987
|
+
if (!isNOU(this.videoEle)) {
|
|
988
|
+
this.videoEle.style.outline = '';
|
|
989
|
+
}
|
|
990
|
+
if (!isNOU(this.contentModule.getEditPanel().querySelector('.e-vid-resize'))) {
|
|
991
|
+
detach(this.contentModule.getEditPanel().querySelector('.e-vid-resize'));
|
|
992
|
+
}
|
|
984
993
|
if (this.quickToolObj && this.quickToolObj.videoQTBar && document.body.contains(this.quickToolObj.videoQTBar.element)) {
|
|
985
994
|
this.quickToolObj.videoQTBar.hidePopup();
|
|
986
995
|
}
|
|
@@ -1026,7 +1035,7 @@ var Video = /** @class */ (function () {
|
|
|
1026
1035
|
cssClass: classes.CLS_RTE_ELEMENTS,
|
|
1027
1036
|
enableRtl: this.parent.enableRtl,
|
|
1028
1037
|
locale: this.parent.locale,
|
|
1029
|
-
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
1038
|
+
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
1030
1039
|
position: { X: 'center', Y: (Browser.isDevice) ? 'center' : 'top' },
|
|
1031
1040
|
isModal: Browser.isDevice,
|
|
1032
1041
|
buttons: [{
|
|
@@ -1109,7 +1118,7 @@ var Video = /** @class */ (function () {
|
|
|
1109
1118
|
videoUrl.appendChild(urlContent);
|
|
1110
1119
|
this.embedInputUrl = this.parent.createElement('textarea', {
|
|
1111
1120
|
className: 'e-input e-embed-video-url',
|
|
1112
|
-
attrs: { placeholder: 'Paste Embed URL here', type: 'text', tabindex: '-1' }
|
|
1121
|
+
attrs: { placeholder: 'Paste Embed URL here', type: 'text', tabindex: '-1', 'aria-label': this.i10n.getConstant('embedVideoLinkHeader') }
|
|
1113
1122
|
});
|
|
1114
1123
|
this.embedInputUrl.addEventListener('keyup', function () {
|
|
1115
1124
|
if (!isNOU(_this.embedInputUrl)) {
|
|
@@ -21,8 +21,8 @@ var RendererFactory = /** @class */ (function () {
|
|
|
21
21
|
*/
|
|
22
22
|
RendererFactory.prototype.addRenderer = function (name, type) {
|
|
23
23
|
var rName = getEnumValue(RenderType, name);
|
|
24
|
-
if (isNullOrUndefined(this.rendererMap[rName])) {
|
|
25
|
-
this.rendererMap[rName] = type;
|
|
24
|
+
if (isNullOrUndefined(this.rendererMap["" + rName])) {
|
|
25
|
+
this.rendererMap["" + rName] = type;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
@@ -35,12 +35,12 @@ var RendererFactory = /** @class */ (function () {
|
|
|
35
35
|
*/
|
|
36
36
|
RendererFactory.prototype.getRenderer = function (name) {
|
|
37
37
|
var rName = getEnumValue(RenderType, name);
|
|
38
|
-
if (isNullOrUndefined(this.rendererMap[rName])) {
|
|
38
|
+
if (isNullOrUndefined(this.rendererMap["" + rName])) {
|
|
39
39
|
// eslint-disable-next-line
|
|
40
40
|
throw "The renderer " + rName + " is not found";
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
return this.rendererMap[rName];
|
|
43
|
+
return this.rendererMap["" + rName];
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
return RendererFactory;
|