@syncfusion/ej2-richtexteditor 23.2.7-52849 → 24.1.41
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/.github/PULL_REQUEST_TEMPLATE/Bug.md +40 -40
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +27 -27
- package/CHANGELOG.md +1775 -1751
- package/README.md +76 -76
- package/dist/ej2-richtexteditor.min.js +10 -0
- package/dist/ej2-richtexteditor.umd.min.js +10 -1
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +682 -434
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +791 -543
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +11 -0
- package/dist/global/ej2-richtexteditor.min.js.map +1 -0
- package/dist/global/index.d.ts +14 -0
- package/helpers/e2e/index.js +3 -3
- package/helpers/e2e/rte-helper.js +13 -13
- package/license +9 -9
- package/package.json +74 -74
- package/src/common/config.js +1 -1
- package/src/common/interface.d.ts +7 -7
- package/src/editor-manager/base/classes.d.ts +1 -1
- package/src/editor-manager/base/classes.js +1 -1
- package/src/editor-manager/base/editor-manager.d.ts +3 -3
- package/src/editor-manager/base/editor-manager.js +3 -3
- package/src/editor-manager/base/enum.d.ts +2 -2
- package/src/editor-manager/base/interface.d.ts +9 -9
- package/src/editor-manager/base/types.d.ts +1 -1
- package/src/editor-manager/plugin/alignments.d.ts +2 -2
- package/src/editor-manager/plugin/alignments.js +2 -2
- package/src/editor-manager/plugin/audio.d.ts +3 -3
- package/src/editor-manager/plugin/audio.js +16 -6
- package/src/editor-manager/plugin/clearformat-exec.d.ts +2 -2
- package/src/editor-manager/plugin/clearformat-exec.js +2 -2
- package/src/editor-manager/plugin/clearformat.d.ts +1 -1
- package/src/editor-manager/plugin/clearformat.js +1 -1
- package/src/editor-manager/plugin/dom-node.d.ts +34 -34
- package/src/editor-manager/plugin/dom-node.js +35 -48
- package/src/editor-manager/plugin/format-painter-actions.d.ts +1 -1
- package/src/editor-manager/plugin/format-painter-actions.js +1 -1
- package/src/editor-manager/plugin/formats.d.ts +2 -2
- package/src/editor-manager/plugin/formats.js +2 -2
- package/src/editor-manager/plugin/image.d.ts +3 -3
- package/src/editor-manager/plugin/image.js +33 -6
- package/src/editor-manager/plugin/indents.d.ts +2 -2
- package/src/editor-manager/plugin/indents.js +2 -2
- package/src/editor-manager/plugin/insert-methods.d.ts +4 -4
- package/src/editor-manager/plugin/insert-methods.js +4 -4
- package/src/editor-manager/plugin/insert-text.d.ts +2 -2
- package/src/editor-manager/plugin/insert-text.js +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml-exec.js +2 -2
- package/src/editor-manager/plugin/inserthtml.d.ts +2 -2
- package/src/editor-manager/plugin/inserthtml.js +7 -4
- package/src/editor-manager/plugin/isformatted.d.ts +8 -8
- package/src/editor-manager/plugin/isformatted.js +8 -8
- package/src/editor-manager/plugin/link.d.ts +2 -2
- package/src/editor-manager/plugin/link.js +2 -2
- package/src/editor-manager/plugin/lists.d.ts +2 -2
- package/src/editor-manager/plugin/lists.js +2 -2
- package/src/editor-manager/plugin/ms-word-clean-up.d.ts +1 -1
- package/src/editor-manager/plugin/ms-word-clean-up.js +5 -2
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +7 -7
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
- package/src/editor-manager/plugin/selection-commands.js +40 -1
- package/src/editor-manager/plugin/selection-exec.d.ts +2 -2
- package/src/editor-manager/plugin/selection-exec.js +2 -2
- package/src/editor-manager/plugin/table.d.ts +2 -2
- package/src/editor-manager/plugin/table.js +2 -2
- package/src/editor-manager/plugin/toolbar-status.d.ts +2 -2
- package/src/editor-manager/plugin/toolbar-status.js +2 -2
- package/src/editor-manager/plugin/undo.d.ts +6 -6
- package/src/editor-manager/plugin/undo.js +6 -6
- package/src/editor-manager/plugin/video.d.ts +3 -3
- package/src/editor-manager/plugin/video.js +3 -3
- package/src/markdown-parser/base/interface.d.ts +10 -10
- package/src/markdown-parser/base/markdown-parser.d.ts +3 -3
- package/src/markdown-parser/base/markdown-parser.js +3 -3
- package/src/markdown-parser/base/types.d.ts +1 -1
- package/src/markdown-parser/plugin/clearformat.d.ts +2 -2
- package/src/markdown-parser/plugin/clearformat.js +2 -2
- package/src/markdown-parser/plugin/formats.d.ts +2 -2
- package/src/markdown-parser/plugin/formats.js +2 -2
- package/src/markdown-parser/plugin/insert-text.d.ts +2 -2
- package/src/markdown-parser/plugin/insert-text.js +2 -2
- package/src/markdown-parser/plugin/link.d.ts +2 -2
- package/src/markdown-parser/plugin/link.js +2 -2
- package/src/markdown-parser/plugin/markdown-selection.d.ts +14 -14
- package/src/markdown-parser/plugin/markdown-selection.js +14 -14
- package/src/markdown-parser/plugin/md-selection-formats.d.ts +1 -1
- package/src/markdown-parser/plugin/md-selection-formats.js +1 -1
- package/src/markdown-parser/plugin/table.d.ts +3 -3
- package/src/markdown-parser/plugin/table.js +3 -3
- package/src/markdown-parser/plugin/undo.d.ts +6 -6
- package/src/markdown-parser/plugin/undo.js +6 -6
- package/src/rich-text-editor/actions/base-quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/base-quick-toolbar.js +27 -13
- package/src/rich-text-editor/actions/base-toolbar.d.ts +3 -3
- package/src/rich-text-editor/actions/base-toolbar.js +3 -3
- package/src/rich-text-editor/actions/color-picker.d.ts +2 -2
- package/src/rich-text-editor/actions/color-picker.js +5 -5
- package/src/rich-text-editor/actions/count.d.ts +3 -3
- package/src/rich-text-editor/actions/count.js +3 -3
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +6 -4
- package/src/rich-text-editor/actions/emoji-picker.d.ts +1 -1
- package/src/rich-text-editor/actions/emoji-picker.js +13 -4
- package/src/rich-text-editor/actions/enter-key.js +2 -1
- 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.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +5 -5
- package/src/rich-text-editor/actions/html-editor.d.ts +5 -3
- package/src/rich-text-editor/actions/html-editor.js +32 -6
- package/src/rich-text-editor/actions/keyboard-model.d.ts +16 -16
- package/src/rich-text-editor/actions/keyboard.d.ts +1 -1
- package/src/rich-text-editor/actions/keyboard.js +20 -20
- package/src/rich-text-editor/actions/markdown-editor.d.ts +2 -2
- package/src/rich-text-editor/actions/markdown-editor.js +2 -2
- package/src/rich-text-editor/actions/paste-clean-up.d.ts +3 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +73 -20
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +9 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +33 -14
- package/src/rich-text-editor/actions/toolbar.d.ts +14 -13
- package/src/rich-text-editor/actions/toolbar.js +31 -23
- package/src/rich-text-editor/actions/xhtml-validation.d.ts +1 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/base/classes.d.ts +126 -121
- package/src/rich-text-editor/base/classes.js +126 -121
- package/src/rich-text-editor/base/constant.d.ts +155 -150
- package/src/rich-text-editor/base/constant.js +155 -150
- package/src/rich-text-editor/base/enum.d.ts +1 -1
- package/src/rich-text-editor/base/enum.js +1 -1
- package/src/rich-text-editor/base/interface.d.ts +59 -49
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +891 -891
- package/src/rich-text-editor/base/rich-text-editor.d.ts +69 -60
- package/src/rich-text-editor/base/rich-text-editor.js +143 -80
- package/src/rich-text-editor/base/util.d.ts +1 -1
- package/src/rich-text-editor/base/util.js +12 -3
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +9 -9
- package/src/rich-text-editor/formatter/html-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/html-formatter.js +15 -15
- package/src/rich-text-editor/formatter/markdown-formatter.d.ts +2 -2
- package/src/rich-text-editor/formatter/markdown-formatter.js +15 -15
- package/src/rich-text-editor/models/default-locale.js +2 -0
- package/src/rich-text-editor/models/iframe-settings-model.d.ts +26 -26
- package/src/rich-text-editor/models/iframe-settings.js +19 -19
- package/src/rich-text-editor/models/inline-mode-model.d.ts +11 -11
- package/src/rich-text-editor/models/inline-mode.js +19 -19
- package/src/rich-text-editor/models/items.js +1 -1
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +760 -760
- package/src/rich-text-editor/models/toolbar-settings.js +19 -19
- package/src/rich-text-editor/renderer/audio-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/audio-module.js +1 -1
- package/src/rich-text-editor/renderer/content-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/content-renderer.js +6 -6
- package/src/rich-text-editor/renderer/dialog-renderer.d.ts +2 -2
- package/src/rich-text-editor/renderer/dialog-renderer.js +12 -3
- package/src/rich-text-editor/renderer/iframe-content-renderer.d.ts +4 -4
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +17 -17
- package/src/rich-text-editor/renderer/image-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/image-module.js +53 -53
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +44 -24
- package/src/rich-text-editor/renderer/markdown-renderer.d.ts +6 -6
- package/src/rich-text-editor/renderer/markdown-renderer.js +6 -6
- package/src/rich-text-editor/renderer/popup-renderer.d.ts +5 -5
- package/src/rich-text-editor/renderer/popup-renderer.js +5 -5
- package/src/rich-text-editor/renderer/render.d.ts +2 -2
- package/src/rich-text-editor/renderer/render.js +2 -2
- package/src/rich-text-editor/renderer/table-module.d.ts +3 -1
- package/src/rich-text-editor/renderer/table-module.js +44 -31
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -15
- package/src/rich-text-editor/renderer/toolbar-renderer.js +22 -102
- package/src/rich-text-editor/renderer/video-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/video-module.js +1 -1
- package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
- package/src/rich-text-editor/renderer/view-source.js +9 -7
- package/src/rich-text-editor/services/renderer-factory.d.ts +3 -3
- package/src/rich-text-editor/services/renderer-factory.js +3 -3
- package/src/rich-text-editor/services/service-locator.d.ts +3 -3
- package/src/rich-text-editor/services/service-locator.js +3 -3
- package/src/selection/selection.d.ts +22 -22
- package/src/selection/selection.js +22 -22
- package/styles/_all.scss +1 -1
- package/styles/bootstrap-dark.css +194 -52
- package/styles/bootstrap.css +197 -53
- package/styles/bootstrap4.css +194 -52
- package/styles/bootstrap5-dark.css +195 -53
- package/styles/bootstrap5.css +195 -53
- package/styles/fabric-dark.css +194 -52
- package/styles/fabric.css +194 -52
- package/styles/fluent-dark.css +197 -53
- package/styles/fluent.css +197 -53
- package/styles/highcontrast-light.css +194 -52
- package/styles/highcontrast.css +194 -52
- package/styles/material-dark.css +196 -53
- package/styles/material.css +196 -53
- package/styles/material3-dark.css +194 -52
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +194 -52
- package/styles/material3.scss +1 -1
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +277 -277
- package/styles/rich-text-editor/_bootstrap-definition.scss +334 -334
- package/styles/rich-text-editor/_bootstrap4-definition.scss +460 -460
- package/styles/rich-text-editor/_bootstrap5-definition.scss +262 -262
- package/styles/rich-text-editor/_fabric-dark-definition.scss +259 -259
- package/styles/rich-text-editor/_fabric-definition.scss +257 -257
- package/styles/rich-text-editor/_fluent-definition.scss +263 -263
- package/styles/rich-text-editor/_fusionnew-definition.scss +261 -261
- package/styles/rich-text-editor/_highcontrast-definition.scss +257 -257
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +257 -257
- package/styles/rich-text-editor/_layout.scss +2147 -2072
- package/styles/rich-text-editor/_material-dark-definition.scss +262 -262
- package/styles/rich-text-editor/_material-definition.scss +260 -260
- package/styles/rich-text-editor/_material3-definition.scss +262 -262
- package/styles/rich-text-editor/_tailwind-definition.scss +257 -257
- package/styles/rich-text-editor/_theme.scss +837 -837
- package/styles/rich-text-editor/bootstrap-dark.css +194 -52
- package/styles/rich-text-editor/bootstrap.css +197 -53
- package/styles/rich-text-editor/bootstrap4.css +194 -52
- package/styles/rich-text-editor/bootstrap5-dark.css +195 -53
- package/styles/rich-text-editor/bootstrap5.css +195 -53
- package/styles/rich-text-editor/fabric-dark.css +194 -52
- package/styles/rich-text-editor/fabric.css +194 -52
- package/styles/rich-text-editor/fluent-dark.css +197 -53
- package/styles/rich-text-editor/fluent.css +197 -53
- package/styles/rich-text-editor/highcontrast-light.css +194 -52
- package/styles/rich-text-editor/highcontrast.css +194 -52
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap4.scss +349 -349
- package/styles/rich-text-editor/icons/_bootstrap5.scss +348 -348
- package/styles/rich-text-editor/icons/_fabric-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_fabric.scss +349 -349
- package/styles/rich-text-editor/icons/_fluent.scss +348 -348
- package/styles/rich-text-editor/icons/_fusionnew.scss +348 -348
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +349 -349
- package/styles/rich-text-editor/icons/_highcontrast.scss +349 -349
- package/styles/rich-text-editor/icons/_material-dark.scss +349 -349
- package/styles/rich-text-editor/icons/_material.scss +349 -349
- package/styles/rich-text-editor/icons/_material3.scss +348 -348
- package/styles/rich-text-editor/icons/_tailwind.scss +348 -348
- package/styles/rich-text-editor/material-dark.css +196 -53
- package/styles/rich-text-editor/material.css +196 -53
- package/styles/rich-text-editor/material3-dark.css +194 -52
- package/styles/rich-text-editor/material3-dark.scss +1 -1
- package/styles/rich-text-editor/material3.css +194 -52
- package/styles/rich-text-editor/material3.scss +1 -1
- package/styles/rich-text-editor/tailwind-dark.css +194 -52
- package/styles/rich-text-editor/tailwind.css +194 -52
- package/styles/tailwind-dark.css +194 -52
- package/styles/tailwind.css +194 -52
- package/tslint.json +111 -0
- package/src/global.d.ts +0 -1
|
@@ -265,18 +265,18 @@ var Image = /** @class */ (function () {
|
|
|
265
265
|
this.resizeBtnInit();
|
|
266
266
|
this.imgEle = e;
|
|
267
267
|
addClass([this.imgEle], 'e-resize');
|
|
268
|
-
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' +
|
|
268
|
+
this.imgResizeDiv = this.parent.createElement('span', { className: 'e-img-resize' + this.parent.getCssClass(true), id: this.rteID + '_imgResize' });
|
|
269
269
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
270
|
-
className: 'e-rte-imageboxmark e-rte-topLeft' +
|
|
270
|
+
className: 'e-rte-imageboxmark e-rte-topLeft' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
271
271
|
}));
|
|
272
272
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
273
|
-
className: 'e-rte-imageboxmark e-rte-topRight' +
|
|
273
|
+
className: 'e-rte-imageboxmark e-rte-topRight' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
274
274
|
}));
|
|
275
275
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
276
|
-
className: 'e-rte-imageboxmark e-rte-botLeft' +
|
|
276
|
+
className: 'e-rte-imageboxmark e-rte-botLeft' + this.parent.getCssClass(true), styles: 'cursor: nesw-resize'
|
|
277
277
|
}));
|
|
278
278
|
this.imgResizeDiv.appendChild(this.parent.createElement('span', {
|
|
279
|
-
className: 'e-rte-imageboxmark e-rte-botRight' +
|
|
279
|
+
className: 'e-rte-imageboxmark e-rte-botRight' + this.parent.getCssClass(true), styles: 'cursor: nwse-resize'
|
|
280
280
|
}));
|
|
281
281
|
if (Browser.isDevice) {
|
|
282
282
|
addClass([this.imgResizeDiv], 'e-mob-rte');
|
|
@@ -429,8 +429,8 @@ var Image = /** @class */ (function () {
|
|
|
429
429
|
img.removeAttribute('height');
|
|
430
430
|
}
|
|
431
431
|
else {
|
|
432
|
-
img.style.width = expectedX + 'px';
|
|
433
|
-
img.style.height = expectedX + 'px';
|
|
432
|
+
img.style.width = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
433
|
+
img.style.height = ((expectedX >= 15) ? expectedX : 15) + 'px';
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
};
|
|
@@ -459,7 +459,6 @@ var Image = /** @class */ (function () {
|
|
|
459
459
|
_this.setAspectRatio(_this.imgEle, parseInt(width, 10), parseInt(height, 10), args);
|
|
460
460
|
_this.resizeImgDupPos(_this.imgEle);
|
|
461
461
|
_this.imgResizePos(_this.imgEle, _this.imgResizeDiv);
|
|
462
|
-
_this.parent.setContentHeight('', false);
|
|
463
462
|
}
|
|
464
463
|
});
|
|
465
464
|
};
|
|
@@ -474,7 +473,7 @@ var Image = /** @class */ (function () {
|
|
|
474
473
|
else if (isNOU(this.parent.insertImageSettings.maxHeight)) {
|
|
475
474
|
this.imgEle.style.maxHeight = '';
|
|
476
475
|
}
|
|
477
|
-
this.imgEle.style.maxWidth = this.parent.getInsertImgMaxWidth() + 'px';
|
|
476
|
+
this.imgEle.style.maxWidth = (closest(this.imgEle, 'ol,ul') != null ? this.parent.getInsertImgMaxWidth() - parseInt((getComputedStyle(closest(this.imgEle, 'ol,ul')).paddingLeft), 0) : this.parent.getInsertImgMaxWidth()) + 'px';
|
|
478
477
|
var pageX = this.getPointX(e);
|
|
479
478
|
var pageY = this.getPointY(e);
|
|
480
479
|
var mouseX = (this.resizeBtnStat.botLeft || this.resizeBtnStat.topLeft) ? -(pageX - this.pageX) : (pageX - this.pageX);
|
|
@@ -771,7 +770,7 @@ var Image = /** @class */ (function () {
|
|
|
771
770
|
};
|
|
772
771
|
Image.prototype.showDialog = function () {
|
|
773
772
|
this.openDialog(false);
|
|
774
|
-
this.setCssClass({ cssClass: this.parent.
|
|
773
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
775
774
|
};
|
|
776
775
|
Image.prototype.closeDialog = function () {
|
|
777
776
|
if (this.dialogObj) {
|
|
@@ -979,19 +978,19 @@ var Image = /** @class */ (function () {
|
|
|
979
978
|
}
|
|
980
979
|
this.imagDialog(e);
|
|
981
980
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
982
|
-
var linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' +
|
|
981
|
+
var linkWrap = this.parent.createElement('div', { className: 'e-img-linkwrap' + this.parent.getCssClass(true) });
|
|
983
982
|
var linkUrl = this.i10n.getConstant('linkurl');
|
|
984
|
-
var content = '<div class="e-rte-field' +
|
|
985
|
-
'<input type="text" data-role ="none" class="e-input e-img-link' +
|
|
983
|
+
var content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
984
|
+
'<input type="text" data-role ="none" class="e-input e-img-link' + this.parent.getCssClass(true) + '" spellcheck="false" placeholder="' + linkUrl + '"/></div>' +
|
|
986
985
|
'<div class="e-rte-label"></div>' + '<div class="e-rte-field">' +
|
|
987
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
986
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>';
|
|
988
987
|
var contentElem = parseHtml(content);
|
|
989
988
|
linkWrap.appendChild(contentElem);
|
|
990
989
|
var linkTarget = linkWrap.querySelector('.e-rte-linkTarget');
|
|
991
990
|
var inputLink = linkWrap.querySelector('.e-img-link');
|
|
992
991
|
var linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
993
992
|
this.checkBoxObj = new CheckBox({
|
|
994
|
-
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
993
|
+
label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
995
994
|
change: function (e) {
|
|
996
995
|
if (e.checked) {
|
|
997
996
|
target_1 = '_blank';
|
|
@@ -1005,11 +1004,12 @@ var Image = /** @class */ (function () {
|
|
|
1005
1004
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
1006
1005
|
this.checkBoxObj.appendTo(linkTarget);
|
|
1007
1006
|
var target_1 = this.checkBoxObj.checked ? '_blank' : null;
|
|
1007
|
+
var imageLabel = this.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null;
|
|
1008
1008
|
var linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
1009
1009
|
var linkargs_1 = {
|
|
1010
1010
|
args: e.args,
|
|
1011
1011
|
selfImage: this, selection: e.selection,
|
|
1012
|
-
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target_1
|
|
1012
|
+
selectNode: e.selectNode, selectParent: e.selectParent, link: inputLink, target: target_1, ariaLabel: imageLabel
|
|
1013
1013
|
};
|
|
1014
1014
|
this.dialogObj.setProperties({
|
|
1015
1015
|
height: 'inherit',
|
|
@@ -1022,7 +1022,7 @@ var Image = /** @class */ (function () {
|
|
|
1022
1022
|
_this.insertlink(linkargs_1);
|
|
1023
1023
|
},
|
|
1024
1024
|
buttonModel: {
|
|
1025
|
-
content: linkUpdate, cssClass: 'e-flat e-update-link' +
|
|
1025
|
+
content: linkUpdate, cssClass: 'e-flat e-update-link' + this.parent.getCssClass(true), isPrimary: true
|
|
1026
1026
|
}
|
|
1027
1027
|
}],
|
|
1028
1028
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-link-dialog'
|
|
@@ -1048,13 +1048,13 @@ var Image = /** @class */ (function () {
|
|
|
1048
1048
|
this.imagDialog(e);
|
|
1049
1049
|
var altText = this.i10n.getConstant('altText');
|
|
1050
1050
|
if (!isNullOrUndefined(this.dialogObj)) {
|
|
1051
|
-
var altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' +
|
|
1051
|
+
var altWrap = this.parent.createElement('div', { className: 'e-img-altwrap' + this.parent.getCssClass(true) });
|
|
1052
1052
|
var altHeader = this.i10n.getConstant('alternateHeader');
|
|
1053
1053
|
var linkUpdate = this.i10n.getConstant('dialogUpdate');
|
|
1054
1054
|
var getAlt = (e.selectNode[0].getAttribute('alt') === null) ? '' :
|
|
1055
1055
|
e.selectNode[0].getAttribute('alt');
|
|
1056
|
-
var content = '<div class="e-rte-field' +
|
|
1057
|
-
'<input type="text" spellcheck="false" class="e-input e-img-alt' +
|
|
1056
|
+
var content = '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
1057
|
+
'<input type="text" spellcheck="false" class="e-input e-img-alt' + this.parent.getCssClass(true) + '" placeholder="' + altText + '"/>' +
|
|
1058
1058
|
'</div>';
|
|
1059
1059
|
var contentElem = parseHtml(content);
|
|
1060
1060
|
contentElem.querySelector('input').setAttribute('value', getAlt);
|
|
@@ -1072,7 +1072,7 @@ var Image = /** @class */ (function () {
|
|
|
1072
1072
|
_this.insertAlt(altArgs_1);
|
|
1073
1073
|
},
|
|
1074
1074
|
buttonModel: {
|
|
1075
|
-
content: linkUpdate, cssClass: 'e-flat e-update-alt' +
|
|
1075
|
+
content: linkUpdate, cssClass: 'e-flat e-update-alt' + this.parent.getCssClass(true), isPrimary: true
|
|
1076
1076
|
}
|
|
1077
1077
|
}],
|
|
1078
1078
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-alt-dialog'
|
|
@@ -1124,14 +1124,14 @@ var Image = /** @class */ (function () {
|
|
|
1124
1124
|
}
|
|
1125
1125
|
if (e.selectNode[0].parentElement.nodeName === 'A') {
|
|
1126
1126
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
1127
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
1127
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
1128
1128
|
subCommand: e.args.item.subCommand
|
|
1129
1129
|
});
|
|
1130
1130
|
proxy.dialogObj.hide({ returnValue: true });
|
|
1131
1131
|
return;
|
|
1132
1132
|
}
|
|
1133
1133
|
proxy.parent.formatter.process(proxy.parent, e.args, e.args, {
|
|
1134
|
-
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, selectNode: e.selectNode,
|
|
1134
|
+
url: url, target: proxy.checkBoxObj.checked ? '_blank' : null, ariaLabel: proxy.checkBoxObj.checked ? this.i10n.getConstant('ImageLinkAriaLabel') : null, selectNode: e.selectNode,
|
|
1135
1135
|
subCommand: e.args.item.subCommand, selection: e.selection
|
|
1136
1136
|
});
|
|
1137
1137
|
var captionEle = closest(e.selectNode[0], '.e-img-caption');
|
|
@@ -1242,11 +1242,11 @@ var Image = /** @class */ (function () {
|
|
|
1242
1242
|
}
|
|
1243
1243
|
else {
|
|
1244
1244
|
this.captionEle = this.parent.createElement('span', {
|
|
1245
|
-
className: classes.CLS_CAPTION + ' ' + classes.CLS_RTE_CAPTION +
|
|
1245
|
+
className: classes.CLS_CAPTION + ' ' + classes.CLS_RTE_CAPTION + this.parent.getCssClass(true),
|
|
1246
1246
|
attrs: { contenteditable: 'false', draggable: 'false', style: 'width:' + this.parent.insertImageSettings.width }
|
|
1247
1247
|
});
|
|
1248
|
-
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' +
|
|
1249
|
-
var imgInner = this.parent.createElement('span', { className: 'e-img-inner' +
|
|
1248
|
+
var imgWrap = this.parent.createElement('span', { className: 'e-img-wrap' + this.parent.getCssClass(true) });
|
|
1249
|
+
var imgInner = this.parent.createElement('span', { className: 'e-img-inner' + this.parent.getCssClass(true),
|
|
1250
1250
|
attrs: { contenteditable: 'true' } });
|
|
1251
1251
|
var parent_1 = e.selectNode[0].parentElement;
|
|
1252
1252
|
if (parent_1.tagName === 'A') {
|
|
@@ -1299,7 +1299,7 @@ var Image = /** @class */ (function () {
|
|
|
1299
1299
|
_this.insertSize(selectObj_1);
|
|
1300
1300
|
},
|
|
1301
1301
|
buttonModel: {
|
|
1302
|
-
content: linkUpdate, cssClass: 'e-flat e-update-size' +
|
|
1302
|
+
content: linkUpdate, cssClass: 'e-flat e-update-size' + this.parent.getCssClass(true), isPrimary: true
|
|
1303
1303
|
}
|
|
1304
1304
|
}],
|
|
1305
1305
|
cssClass: this.dialogObj.cssClass + ' e-rte-img-size-dialog'
|
|
@@ -1345,7 +1345,7 @@ var Image = /** @class */ (function () {
|
|
|
1345
1345
|
this.dialogObj.hide({ returnValue: true });
|
|
1346
1346
|
return;
|
|
1347
1347
|
}
|
|
1348
|
-
var imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' +
|
|
1348
|
+
var imgDialog = this.parent.createElement('div', { className: 'e-rte-img-dialog' + this.parent.getCssClass(true), id: this.rteID + '_image' });
|
|
1349
1349
|
this.parent.element.appendChild(imgDialog);
|
|
1350
1350
|
var imgInsert = this.i10n.getConstant('dialogInsert');
|
|
1351
1351
|
var imglinkCancel = this.i10n.getConstant('dialogCancel');
|
|
@@ -1354,20 +1354,20 @@ var Image = /** @class */ (function () {
|
|
|
1354
1354
|
var selectObj = { selfImage: this, selection: e.selection, args: e.args, selectParent: e.selectParent };
|
|
1355
1355
|
var dialogModel = {
|
|
1356
1356
|
header: imgHeader,
|
|
1357
|
-
cssClass: classes.CLS_RTE_ELEMENTS +
|
|
1357
|
+
cssClass: classes.CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
1358
1358
|
enableRtl: this.parent.enableRtl,
|
|
1359
1359
|
locale: this.parent.locale,
|
|
1360
1360
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '340px',
|
|
1361
1361
|
isModal: Browser.isDevice,
|
|
1362
1362
|
buttons: [{
|
|
1363
1363
|
click: this.insertImageUrl.bind(selectObj),
|
|
1364
|
-
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' +
|
|
1364
|
+
buttonModel: { content: imgInsert, cssClass: 'e-flat e-insertImage' + this.parent.getCssClass(true), isPrimary: true, disabled: true }
|
|
1365
1365
|
},
|
|
1366
1366
|
{
|
|
1367
1367
|
click: function (e) {
|
|
1368
1368
|
_this.cancelDialog(e);
|
|
1369
1369
|
},
|
|
1370
|
-
buttonModel: { cssClass: 'e-flat e-cancel' +
|
|
1370
|
+
buttonModel: { cssClass: 'e-flat e-cancel' + this.parent.getCssClass(true), content: imglinkCancel }
|
|
1371
1371
|
}],
|
|
1372
1372
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
1373
1373
|
animationSettings: { effect: 'None' },
|
|
@@ -1390,12 +1390,12 @@ var Image = /** @class */ (function () {
|
|
|
1390
1390
|
_this.dialogObj = null;
|
|
1391
1391
|
}
|
|
1392
1392
|
};
|
|
1393
|
-
var dialogContent = this.parent.createElement('div', { className: 'e-img-content' +
|
|
1393
|
+
var dialogContent = this.parent.createElement('div', { className: 'e-img-content' + this.parent.getCssClass(true) });
|
|
1394
1394
|
if ((!isNullOrUndefined(this.parent.insertImageSettings.path) && this.parent.editorMode === 'Markdown')
|
|
1395
1395
|
|| this.parent.editorMode === 'HTML') {
|
|
1396
1396
|
dialogContent.appendChild(this.imgUpload(e));
|
|
1397
1397
|
}
|
|
1398
|
-
var linkHeader = this.parent.createElement('div', { className: 'e-linkheader' +
|
|
1398
|
+
var linkHeader = this.parent.createElement('div', { className: 'e-linkheader' + this.parent.getCssClass(true) });
|
|
1399
1399
|
var linkHeaderText = this.i10n.getConstant('imageLinkHeader');
|
|
1400
1400
|
if (this.parent.editorMode === 'HTML') {
|
|
1401
1401
|
linkHeader.innerHTML = linkHeaderText;
|
|
@@ -1512,10 +1512,10 @@ var Image = /** @class */ (function () {
|
|
|
1512
1512
|
// eslint-disable-next-line
|
|
1513
1513
|
Image.prototype.imageUrlPopup = function (e) {
|
|
1514
1514
|
var _this = this;
|
|
1515
|
-
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' +
|
|
1515
|
+
var imgUrl = this.parent.createElement('div', { className: 'imgUrl' + this.parent.getCssClass(true) });
|
|
1516
1516
|
var placeUrl = this.i10n.getConstant('imageUrl');
|
|
1517
1517
|
this.inputUrl = this.parent.createElement('input', {
|
|
1518
|
-
className: 'e-input e-img-url' +
|
|
1518
|
+
className: 'e-input e-img-url' + this.parent.getCssClass(true),
|
|
1519
1519
|
attrs: { placeholder: placeUrl, spellcheck: 'false', 'aria-label': this.i10n.getConstant('imageLinkHeader') }
|
|
1520
1520
|
});
|
|
1521
1521
|
this.inputUrl.addEventListener('input', function () {
|
|
@@ -1582,7 +1582,7 @@ var Image = /** @class */ (function () {
|
|
|
1582
1582
|
var selectNode = e.selectNode[0];
|
|
1583
1583
|
var imgHeight = this.i10n.getConstant('imageHeight');
|
|
1584
1584
|
var imgWidth = this.i10n.getConstant('imageWidth');
|
|
1585
|
-
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' +
|
|
1585
|
+
var imgSizeWrap = this.parent.createElement('div', { className: 'e-img-sizewrap' + this.parent.getCssClass(true) });
|
|
1586
1586
|
var widthVal = isNullOrUndefined(this.changedWidthValue) && (selectNode.style.width.toString() === 'auto' ||
|
|
1587
1587
|
selectNode.style.width !== '') ? selectNode.style.width : !isNullOrUndefined(this.changedWidthValue) ?
|
|
1588
1588
|
this.changedWidthValue : (parseInt(selectNode.getClientRects()[0].width.toString(), 10)).toString();
|
|
@@ -1591,10 +1591,10 @@ var Image = /** @class */ (function () {
|
|
|
1591
1591
|
this.changedHeightValue : (parseInt(selectNode.getClientRects()[0].height.toString(), 10)).toString();
|
|
1592
1592
|
this.changedWidthValue = null;
|
|
1593
1593
|
this.changedHeightValue = null;
|
|
1594
|
-
var content = '<div class="e-rte-label' +
|
|
1595
|
-
'</label></div><div class="e-rte-field' +
|
|
1596
|
-
'<div class="e-rte-label' +
|
|
1597
|
-
'<input type="text" id="imgheight" class="e-img-height' +
|
|
1594
|
+
var content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + imgWidth +
|
|
1595
|
+
'</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"><input type="text" id="imgwidth" class="e-img-width' + this.parent.getCssClass(true) + '"/></div>' +
|
|
1596
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + imgHeight + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
1597
|
+
'<input type="text" id="imgheight" class="e-img-height' + this.parent.getCssClass(true) + '"/></div>';
|
|
1598
1598
|
var contentElem = parseHtml(content);
|
|
1599
1599
|
contentElem.getElementById('imgwidth').setAttribute('value', widthVal);
|
|
1600
1600
|
contentElem.getElementById('imgheight').setAttribute('value', heightVal);
|
|
@@ -1602,7 +1602,7 @@ var Image = /** @class */ (function () {
|
|
|
1602
1602
|
this.widthNum = new TextBox({
|
|
1603
1603
|
value: formatUnit(widthVal),
|
|
1604
1604
|
enableRtl: this.parent.enableRtl,
|
|
1605
|
-
cssClass: this.parent.
|
|
1605
|
+
cssClass: this.parent.getCssClass(),
|
|
1606
1606
|
input: function (e) {
|
|
1607
1607
|
_this.inputWidthValue = formatUnit(_this.inputValue(e.value));
|
|
1608
1608
|
}
|
|
@@ -1612,7 +1612,7 @@ var Image = /** @class */ (function () {
|
|
|
1612
1612
|
this.heightNum = new TextBox({
|
|
1613
1613
|
value: formatUnit(heightVal),
|
|
1614
1614
|
enableRtl: this.parent.enableRtl,
|
|
1615
|
-
cssClass: this.parent.
|
|
1615
|
+
cssClass: this.parent.getCssClass(),
|
|
1616
1616
|
input: function (e) {
|
|
1617
1617
|
_this.inputHeightValue = formatUnit(_this.inputValue(e.value));
|
|
1618
1618
|
}
|
|
@@ -1684,16 +1684,16 @@ var Image = /** @class */ (function () {
|
|
|
1684
1684
|
save = e.selection;
|
|
1685
1685
|
selectParent = e.selectParent;
|
|
1686
1686
|
}
|
|
1687
|
-
var uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' +
|
|
1687
|
+
var uploadParentEle = this.parent.createElement('div', { className: 'e-img-uploadwrap e-droparea' + this.parent.getCssClass(true) });
|
|
1688
1688
|
var deviceImgUpMsg = this.i10n.getConstant('imageDeviceUploadMessage');
|
|
1689
1689
|
var imgUpMsg = this.i10n.getConstant('imageUploadMessage');
|
|
1690
|
-
var span = this.parent.createElement('span', { className: 'e-droptext' +
|
|
1690
|
+
var span = this.parent.createElement('span', { className: 'e-droptext' + this.parent.getCssClass(true) });
|
|
1691
1691
|
var spanMsg = this.parent.createElement('span', {
|
|
1692
|
-
className: 'e-rte-upload-text' +
|
|
1692
|
+
className: 'e-rte-upload-text' + this.parent.getCssClass(true), innerHTML: ((Browser.isDevice) ? deviceImgUpMsg : imgUpMsg)
|
|
1693
1693
|
});
|
|
1694
1694
|
span.appendChild(spanMsg);
|
|
1695
1695
|
var btnEle = this.parent.createElement('button', {
|
|
1696
|
-
className: 'e-browsebtn' +
|
|
1696
|
+
className: 'e-browsebtn' + this.parent.getCssClass(true), id: this.rteID + '_insertImage', attrs: { autofocus: 'true', type: 'button' }
|
|
1697
1697
|
});
|
|
1698
1698
|
span.appendChild(btnEle);
|
|
1699
1699
|
uploadParentEle.appendChild(span);
|
|
@@ -1705,7 +1705,7 @@ var Image = /** @class */ (function () {
|
|
|
1705
1705
|
var btnClick = (Browser.isDevice) ? span : btnEle;
|
|
1706
1706
|
EventHandler.add(btnClick, 'click', this.fileSelect, this);
|
|
1707
1707
|
var uploadEle = this.parent.createElement('input', {
|
|
1708
|
-
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.
|
|
1708
|
+
id: this.rteID + '_upload', attrs: { type: 'File', name: 'UploadFiles' }, className: this.parent.getCssClass()
|
|
1709
1709
|
});
|
|
1710
1710
|
uploadParentEle.appendChild(uploadEle);
|
|
1711
1711
|
var altText;
|
|
@@ -1713,7 +1713,7 @@ var Image = /** @class */ (function () {
|
|
|
1713
1713
|
var filesData;
|
|
1714
1714
|
this.uploadObj = new Uploader({
|
|
1715
1715
|
asyncSettings: { saveUrl: this.parent.insertImageSettings.saveUrl, removeUrl: this.parent.insertImageSettings.removeUrl },
|
|
1716
|
-
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.
|
|
1716
|
+
dropArea: span, multiple: false, enableRtl: this.parent.enableRtl, cssClass: this.parent.getCssClass(),
|
|
1717
1717
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
1718
1718
|
selected: function (e) {
|
|
1719
1719
|
proxy.isImgUploaded = true;
|
|
@@ -1787,9 +1787,9 @@ var Image = /** @class */ (function () {
|
|
|
1787
1787
|
failure: function (e) {
|
|
1788
1788
|
_this.parent.trigger(events.imageUploadFailed, e);
|
|
1789
1789
|
},
|
|
1790
|
-
removing: function () {
|
|
1790
|
+
removing: function (removeEventArgs) {
|
|
1791
1791
|
// eslint-disable-next-line
|
|
1792
|
-
_this.parent.trigger(events.imageRemoving,
|
|
1792
|
+
_this.parent.trigger(events.imageRemoving, removeEventArgs, function (e) {
|
|
1793
1793
|
proxy.isImgUploaded = false;
|
|
1794
1794
|
_this.dialogObj.getButtons(0).element.disabled = true;
|
|
1795
1795
|
proxy.inputUrl.removeAttribute('disabled');
|
|
@@ -2078,7 +2078,7 @@ var Image = /** @class */ (function () {
|
|
|
2078
2078
|
saveUrl: this.parent.insertImageSettings.saveUrl,
|
|
2079
2079
|
removeUrl: this.parent.insertImageSettings.removeUrl
|
|
2080
2080
|
},
|
|
2081
|
-
cssClass: classes.CLS_RTE_DIALOG_UPLOAD +
|
|
2081
|
+
cssClass: classes.CLS_RTE_DIALOG_UPLOAD + this.parent.getCssClass(true),
|
|
2082
2082
|
dropArea: this.parent.element,
|
|
2083
2083
|
allowedExtensions: this.parent.insertImageSettings.allowedTypes.toString(),
|
|
2084
2084
|
removing: function () {
|
|
@@ -2280,14 +2280,14 @@ var Image = /** @class */ (function () {
|
|
|
2280
2280
|
* @method destroy
|
|
2281
2281
|
* @returns {void}
|
|
2282
2282
|
* @hidden
|
|
2283
|
-
|
|
2283
|
+
|
|
2284
2284
|
*/
|
|
2285
2285
|
/* eslint-enable */
|
|
2286
2286
|
Image.prototype.destroy = function () {
|
|
2287
|
-
this.prevSelectedImgEle = undefined;
|
|
2288
2287
|
if (isNOU(this.parent)) {
|
|
2289
2288
|
return;
|
|
2290
2289
|
}
|
|
2290
|
+
this.prevSelectedImgEle = undefined;
|
|
2291
2291
|
this.removeEventListener();
|
|
2292
2292
|
};
|
|
2293
2293
|
Image.prototype.moduleDestroy = function () {
|
|
@@ -129,7 +129,7 @@ var Link = /** @class */ (function () {
|
|
|
129
129
|
pageY = (this.parent.iframeSettings.enable) ? window.pageYOffset + parentTop + args.clientY : args.pageY;
|
|
130
130
|
}
|
|
131
131
|
if (this.quickToolObj.linkQTBar) {
|
|
132
|
-
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer);
|
|
132
|
+
this.quickToolObj.linkQTBar.showPopup(pageX, pageY, range.endContainer, 'link');
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
};
|
|
@@ -160,12 +160,32 @@ var Link = /** @class */ (function () {
|
|
|
160
160
|
if (isPopupOpen) {
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
if (e.args.ctrlKey === false) {
|
|
164
|
+
this.showLinkQuickToolbar({
|
|
165
|
+
args: args,
|
|
166
|
+
isNotify: false,
|
|
167
|
+
type: 'Links',
|
|
168
|
+
elements: [args.target]
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
var selection = this.parent.formatter.editorManager.nodeSelection;
|
|
173
|
+
var range = selection.getRange(this.parent.contentModule.getDocument());
|
|
174
|
+
var args_1 = {
|
|
175
|
+
args: {
|
|
176
|
+
item: {
|
|
177
|
+
subCommand: 'OpenLink',
|
|
178
|
+
command: 'Links',
|
|
179
|
+
name: ''
|
|
180
|
+
},
|
|
181
|
+
originalEvent: e.args
|
|
182
|
+
},
|
|
183
|
+
selectNode: selection.getNodeCollection(range),
|
|
184
|
+
selectParent: selection.getParentNodeCollection(range),
|
|
185
|
+
selection: selection.save(range, this.parent.contentModule.getDocument())
|
|
186
|
+
};
|
|
187
|
+
this.parent.notify(events.openLink, args_1);
|
|
188
|
+
}
|
|
169
189
|
}
|
|
170
190
|
else {
|
|
171
191
|
this.hideLinkQuickToolbar();
|
|
@@ -222,7 +242,7 @@ var Link = /** @class */ (function () {
|
|
|
222
242
|
};
|
|
223
243
|
Link.prototype.showDialog = function () {
|
|
224
244
|
this.openDialog(false);
|
|
225
|
-
this.setCssClass({ cssClass: this.parent.
|
|
245
|
+
this.setCssClass({ cssClass: this.parent.getCssClass() });
|
|
226
246
|
};
|
|
227
247
|
Link.prototype.closeDialog = function () {
|
|
228
248
|
if (this.dialogObj) {
|
|
@@ -255,22 +275,22 @@ var Link = /** @class */ (function () {
|
|
|
255
275
|
var textPlace = this.i10n.getConstant('textPlaceholder');
|
|
256
276
|
var title = this.i10n.getConstant('linkTitle');
|
|
257
277
|
var linkDialogEle = this.parent.createElement('div', {
|
|
258
|
-
className: 'e-rte-link-dialog' +
|
|
278
|
+
className: 'e-rte-link-dialog' + this.parent.getCssClass(true), id: this.rteID + '_rtelink'
|
|
259
279
|
});
|
|
260
280
|
this.parent.element.appendChild(linkDialogEle);
|
|
261
281
|
var linkContent = this.parent.createElement('div', {
|
|
262
|
-
className: 'e-rte-linkcontent' +
|
|
282
|
+
className: 'e-rte-linkcontent' + this.parent.getCssClass(true), id: this.rteID + '_linkContent'
|
|
263
283
|
});
|
|
264
284
|
var htmlTextbox = (this.parent.editorMode === 'HTML') ? '<label>' + linkTooltip +
|
|
265
|
-
'</label></div><div class="e-rte-field' +
|
|
266
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '"aria-label="' + this.i10n.getConstant('linkTitle') + '" class="e-input e-rte-linkTitle' +
|
|
267
|
-
'<div class="e-rte-label' +
|
|
268
|
-
'<input type="checkbox" class="e-rte-linkTarget' +
|
|
269
|
-
var content = '<div class="e-rte-label' +
|
|
270
|
-
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '"aria-label="' + this.i10n.getConstant('linkWebUrl') + '" class="e-input e-rte-linkurl' +
|
|
271
|
-
'<div class="e-rte-label' +
|
|
272
|
-
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' +
|
|
273
|
-
'</div><div class="e-rte-label' +
|
|
285
|
+
'</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
286
|
+
'<input type="text" data-role ="none" spellcheck="false" placeholder = "' + title + '"aria-label="' + this.i10n.getConstant('linkTitle') + '" class="e-input e-rte-linkTitle' + this.parent.getCssClass(true) + '"></div>' +
|
|
287
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '"></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
288
|
+
'<input type="checkbox" class="e-rte-linkTarget' + this.parent.getCssClass(true) + '" data-role ="none"></div>' : '';
|
|
289
|
+
var content = '<div class="e-rte-label' + this.parent.getCssClass(true) + '"><label>' + linkWebAddress + '</label></div>' + '<div class="e-rte-field' + this.parent.getCssClass(true) + '">' +
|
|
290
|
+
'<input type="text" data-role ="none" spellcheck="false" placeholder="' + urlPlace + '"aria-label="' + this.i10n.getConstant('linkWebUrl') + '" class="e-input e-rte-linkurl' + this.parent.getCssClass(true) + '"/></div>' +
|
|
291
|
+
'<div class="e-rte-label' + this.parent.getCssClass(true) + '">' + '<label>' + linkDisplayText + '</label></div><div class="e-rte-field' + this.parent.getCssClass(true) + '"> ' +
|
|
292
|
+
'<input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText' + this.parent.getCssClass(true) + '"aria-label="' + this.i10n.getConstant('linkText') + '" placeholder="' + textPlace + '">' +
|
|
293
|
+
'</div><div class="e-rte-label' + this.parent.getCssClass(true) + '">' + htmlTextbox;
|
|
274
294
|
var contentElem = parseHtml(content);
|
|
275
295
|
linkContent.appendChild(contentElem);
|
|
276
296
|
var linkTarget = linkContent.querySelector('.e-rte-linkTarget');
|
|
@@ -279,7 +299,7 @@ var Link = /** @class */ (function () {
|
|
|
279
299
|
var linkTitle = linkContent.querySelector('.e-rte-linkTitle');
|
|
280
300
|
var linkOpenLabel = this.i10n.getConstant('linkOpenInNewWindow');
|
|
281
301
|
this.checkBoxObj = new CheckBox({ label: linkOpenLabel, checked: true, enableRtl: this.parent.enableRtl,
|
|
282
|
-
cssClass: this.parent.
|
|
302
|
+
cssClass: this.parent.getCssClass() });
|
|
283
303
|
this.checkBoxObj.isStringTemplate = true;
|
|
284
304
|
this.checkBoxObj.createElement = this.parent.createElement;
|
|
285
305
|
this.checkBoxObj.appendTo(linkTarget);
|
|
@@ -292,16 +312,16 @@ var Link = /** @class */ (function () {
|
|
|
292
312
|
var dialogModel = {
|
|
293
313
|
header: this.i10n.getConstant('linkHeader'),
|
|
294
314
|
content: linkContent,
|
|
295
|
-
cssClass: CLS_RTE_ELEMENTS +
|
|
315
|
+
cssClass: CLS_RTE_ELEMENTS + this.parent.getCssClass(true),
|
|
296
316
|
enableRtl: this.parent.enableRtl,
|
|
297
317
|
locale: this.parent.locale,
|
|
298
318
|
showCloseIcon: true, closeOnEscape: true, width: (Browser.isDevice) ? '290px' : '310px',
|
|
299
319
|
isModal: Browser.isDevice,
|
|
300
320
|
buttons: [{
|
|
301
321
|
click: this.insertlink.bind(selectObj),
|
|
302
|
-
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' +
|
|
322
|
+
buttonModel: { content: linkInsert, cssClass: 'e-flat e-insertLink' + this.parent.getCssClass(true), isPrimary: true }
|
|
303
323
|
},
|
|
304
|
-
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' +
|
|
324
|
+
{ click: this.cancelDialog.bind(selectObj), buttonModel: { cssClass: 'e-flat' + this.parent.getCssClass(true), content: linkCancel } }],
|
|
305
325
|
target: (Browser.isDevice) ? document.body : this.parent.element,
|
|
306
326
|
animationSettings: { effect: 'None' },
|
|
307
327
|
close: function (event) {
|
|
@@ -524,7 +544,7 @@ var Link = /** @class */ (function () {
|
|
|
524
544
|
* @function destroy
|
|
525
545
|
* @returns {void}
|
|
526
546
|
* @hidden
|
|
527
|
-
|
|
547
|
+
|
|
528
548
|
*/
|
|
529
549
|
Link.prototype.destroy = function () {
|
|
530
550
|
if (isNOU(this.parent)) {
|
|
@@ -3,7 +3,7 @@ import { IRenderer, IRichTextEditor } from '../base/interface';
|
|
|
3
3
|
* Markdown module is used to render Rich Text Editor as Markdown editor content
|
|
4
4
|
*
|
|
5
5
|
* @hidden
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
*/
|
|
8
8
|
export declare class MarkdownRender implements IRenderer {
|
|
9
9
|
private contentPanel;
|
|
@@ -20,7 +20,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
20
20
|
*
|
|
21
21
|
* @returns {void}
|
|
22
22
|
* @hidden
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
*/
|
|
25
25
|
renderPanel(): void;
|
|
26
26
|
/**
|
|
@@ -28,7 +28,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
28
28
|
*
|
|
29
29
|
* @returns {Element} - specifies the element
|
|
30
30
|
* @hidden
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
*/
|
|
33
33
|
getPanel(): Element;
|
|
34
34
|
/**
|
|
@@ -36,7 +36,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
36
36
|
*
|
|
37
37
|
* @returns {Element} - specifies the element
|
|
38
38
|
* @hidden
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
*/
|
|
41
41
|
getEditPanel(): Element;
|
|
42
42
|
/**
|
|
@@ -51,7 +51,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
51
51
|
* @param {Element} panel - specifies the element.
|
|
52
52
|
* @returns {void}
|
|
53
53
|
* @hidden
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
*/
|
|
56
56
|
setPanel(panel: Element): void;
|
|
57
57
|
/**
|
|
@@ -59,7 +59,7 @@ export declare class MarkdownRender implements IRenderer {
|
|
|
59
59
|
*
|
|
60
60
|
* @returns {void}
|
|
61
61
|
* @hidden
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
*/
|
|
64
64
|
getDocument(): Document;
|
|
65
65
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Markdown module is used to render Rich Text Editor as Markdown editor content
|
|
3
3
|
*
|
|
4
4
|
* @hidden
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
*/
|
|
7
7
|
var MarkdownRender = /** @class */ (function () {
|
|
8
8
|
/**
|
|
@@ -18,7 +18,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
18
18
|
*
|
|
19
19
|
* @returns {void}
|
|
20
20
|
* @hidden
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
*/
|
|
23
23
|
MarkdownRender.prototype.renderPanel = function () {
|
|
24
24
|
var rteObj = this.parent;
|
|
@@ -37,7 +37,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
37
37
|
*
|
|
38
38
|
* @returns {Element} - specifies the element
|
|
39
39
|
* @hidden
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
*/
|
|
42
42
|
MarkdownRender.prototype.getPanel = function () {
|
|
43
43
|
return this.contentPanel;
|
|
@@ -47,7 +47,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
47
47
|
*
|
|
48
48
|
* @returns {Element} - specifies the element
|
|
49
49
|
* @hidden
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
*/
|
|
52
52
|
MarkdownRender.prototype.getEditPanel = function () {
|
|
53
53
|
return this.editableElement;
|
|
@@ -66,7 +66,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
66
66
|
* @param {Element} panel - specifies the element.
|
|
67
67
|
* @returns {void}
|
|
68
68
|
* @hidden
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
*/
|
|
71
71
|
MarkdownRender.prototype.setPanel = function (panel) {
|
|
72
72
|
this.contentPanel = panel;
|
|
@@ -76,7 +76,7 @@ var MarkdownRender = /** @class */ (function () {
|
|
|
76
76
|
*
|
|
77
77
|
* @returns {void}
|
|
78
78
|
* @hidden
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
*/
|
|
81
81
|
MarkdownRender.prototype.getDocument = function () {
|
|
82
82
|
return this.getEditPanel().ownerDocument;
|
|
@@ -4,7 +4,7 @@ import { BaseQuickToolbar } from '../actions/base-quick-toolbar';
|
|
|
4
4
|
* `Popup renderer` module is used to render popup in RichTextEditor.
|
|
5
5
|
*
|
|
6
6
|
* @hidden
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
*/
|
|
9
9
|
export declare class PopupRenderer implements IRenderer {
|
|
10
10
|
private popupObj;
|
|
@@ -23,7 +23,7 @@ export declare class PopupRenderer implements IRenderer {
|
|
|
23
23
|
* @param {BaseQuickToolbar} args - specifies the arguments.
|
|
24
24
|
* @returns {void}
|
|
25
25
|
* @hidden
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
*/
|
|
28
28
|
renderPopup(args: BaseQuickToolbar): void;
|
|
29
29
|
/**
|
|
@@ -31,7 +31,7 @@ export declare class PopupRenderer implements IRenderer {
|
|
|
31
31
|
*
|
|
32
32
|
* @returns {void}
|
|
33
33
|
* @hidden
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
*/
|
|
36
36
|
renderPanel(): void;
|
|
37
37
|
/**
|
|
@@ -39,7 +39,7 @@ export declare class PopupRenderer implements IRenderer {
|
|
|
39
39
|
*
|
|
40
40
|
* @returns {Element} - specifies the element
|
|
41
41
|
* @hidden
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
*/
|
|
44
44
|
getPanel(): Element;
|
|
45
45
|
/**
|
|
@@ -48,7 +48,7 @@ export declare class PopupRenderer implements IRenderer {
|
|
|
48
48
|
* @returns {void}
|
|
49
49
|
* @param {Element} panel - specifies the element
|
|
50
50
|
* @hidden
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
*/
|
|
53
53
|
setPanel(panel: Element): void;
|
|
54
54
|
}
|