@syncfusion/ej2-richtexteditor 19.3.45 → 19.3.53-6125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1019 -977
- package/README.md +67 -67
- package/dist/ej2-richtexteditor.umd.min.js +1 -10
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +217 -137
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +326 -246
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.js +3 -3
- package/license +9 -9
- package/package.json +75 -75
- 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/interface.d.ts +7 -7
- 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/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 +34 -34
- 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 +3 -3
- 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 +13 -3
- 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 +1 -1
- package/src/editor-manager/plugin/nodecutter.d.ts +6 -6
- package/src/editor-manager/plugin/nodecutter.js +6 -6
- package/src/editor-manager/plugin/selection-commands.d.ts +1 -1
- package/src/editor-manager/plugin/selection-commands.js +19 -2
- 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/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/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 +9 -9
- 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 +2 -2
- 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 +12 -2
- package/src/rich-text-editor/actions/enter-key.js +1 -0
- package/src/rich-text-editor/actions/full-screen.d.ts +3 -3
- package/src/rich-text-editor/actions/full-screen.js +3 -3
- package/src/rich-text-editor/actions/html-editor.d.ts +3 -3
- package/src/rich-text-editor/actions/html-editor.js +3 -3
- 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 +1 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +1 -1
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +10 -9
- package/src/rich-text-editor/actions/quick-toolbar.js +29 -11
- package/src/rich-text-editor/actions/toolbar.d.ts +13 -13
- package/src/rich-text-editor/actions/toolbar.js +13 -13
- 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 +107 -107
- package/src/rich-text-editor/base/classes.js +107 -107
- package/src/rich-text-editor/base/constant.d.ts +120 -120
- package/src/rich-text-editor/base/constant.js +120 -120
- 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 +47 -45
- package/src/rich-text-editor/base/interface.js +1 -1
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +851 -851
- package/src/rich-text-editor/base/rich-text-editor.d.ts +53 -53
- package/src/rich-text-editor/base/rich-text-editor.js +65 -66
- package/src/rich-text-editor/base/util.d.ts +1 -1
- package/src/rich-text-editor/base/util.js +1 -1
- package/src/rich-text-editor/formatter/formatter.d.ts +8 -8
- package/src/rich-text-editor/formatter/formatter.js +11 -11
- 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/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/toolbar-settings-model.d.ts +439 -439
- package/src/rich-text-editor/models/toolbar-settings.d.ts +1 -1
- package/src/rich-text-editor/models/toolbar-settings.js +19 -19
- 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 +2 -2
- 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 +3 -1
- package/src/rich-text-editor/renderer/image-module.js +24 -3
- package/src/rich-text-editor/renderer/link-module.d.ts +1 -1
- package/src/rich-text-editor/renderer/link-module.js +4 -3
- 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 +1 -1
- package/src/rich-text-editor/renderer/table-module.js +4 -3
- package/src/rich-text-editor/renderer/toolbar-renderer.d.ts +9 -9
- package/src/rich-text-editor/renderer/toolbar-renderer.js +12 -11
- package/src/rich-text-editor/renderer/view-source.d.ts +6 -6
- package/src/rich-text-editor/renderer/view-source.js +6 -6
- 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 +24 -23
- package/styles/_all.scss +2 -2
- package/styles/bootstrap-dark.css +4 -0
- package/styles/bootstrap.css +4 -0
- package/styles/bootstrap4.css +4 -0
- package/styles/bootstrap5-dark.css +4 -0
- package/styles/bootstrap5.css +4 -0
- package/styles/fabric-dark.css +4 -0
- package/styles/fabric.css +4 -0
- package/styles/highcontrast-light.css +4 -0
- package/styles/highcontrast.css +4 -0
- package/styles/material-dark.css +4 -0
- package/styles/material.css +4 -0
- package/styles/rich-text-editor/_all.scss +2 -2
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +187 -187
- package/styles/rich-text-editor/_bootstrap-definition.scss +244 -244
- package/styles/rich-text-editor/_bootstrap4-definition.scss +370 -370
- package/styles/rich-text-editor/_bootstrap5-definition.scss +168 -168
- package/styles/rich-text-editor/_fabric-dark-definition.scss +168 -168
- package/styles/rich-text-editor/_fabric-definition.scss +167 -167
- package/styles/rich-text-editor/_highcontrast-definition.scss +167 -167
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +167 -167
- package/styles/rich-text-editor/_layout.scss +1639 -1635
- package/styles/rich-text-editor/_material-dark-definition.scss +172 -172
- package/styles/rich-text-editor/_material-definition.scss +169 -169
- package/styles/rich-text-editor/_tailwind-definition.scss +167 -167
- package/styles/rich-text-editor/_theme.scss +626 -626
- package/styles/rich-text-editor/bootstrap-dark.css +4 -0
- package/styles/rich-text-editor/bootstrap.css +4 -0
- package/styles/rich-text-editor/bootstrap4.css +4 -0
- package/styles/rich-text-editor/bootstrap5-dark.css +4 -0
- package/styles/rich-text-editor/bootstrap5.css +4 -0
- package/styles/rich-text-editor/fabric-dark.css +4 -0
- package/styles/rich-text-editor/fabric.css +4 -0
- package/styles/rich-text-editor/highcontrast-light.css +4 -0
- package/styles/rich-text-editor/highcontrast.css +4 -0
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap4.scss +304 -304
- package/styles/rich-text-editor/icons/_bootstrap5.scss +303 -303
- package/styles/rich-text-editor/icons/_fabric-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_fabric.scss +304 -304
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +304 -304
- package/styles/rich-text-editor/icons/_highcontrast.scss +304 -304
- package/styles/rich-text-editor/icons/_material-dark.scss +304 -304
- package/styles/rich-text-editor/icons/_material.scss +304 -304
- package/styles/rich-text-editor/icons/_tailwind.scss +304 -304
- package/styles/rich-text-editor/material-dark.css +4 -0
- package/styles/rich-text-editor/material.css +4 -0
- package/styles/rich-text-editor/tailwind-dark.css +4 -0
- package/styles/rich-text-editor/tailwind.css +4 -0
- package/styles/tailwind-dark.css +4 -0
- package/styles/tailwind.css +4 -0
- package/.eslintrc.json +0 -244
- package/dist/global/ej2-richtexteditor.min.js +0 -11
- package/dist/global/ej2-richtexteditor.min.js.map +0 -1
- package/dist/global/index.d.ts +0 -14
- package/tslint.json +0 -111
|
@@ -2739,7 +2739,8 @@ class ToolbarRenderer {
|
|
|
2739
2739
|
this.parent.notify(beforeDropDownItemRender, args);
|
|
2740
2740
|
}
|
|
2741
2741
|
dropDownOpen(args) {
|
|
2742
|
-
if (args.element.parentElement.getAttribute('id').indexOf('TableCell') > -1)
|
|
2742
|
+
if (args.element.parentElement.getAttribute('id').indexOf('TableCell') > -1 && !isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-merge')) &&
|
|
2743
|
+
(!isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-horizontal-split')) || !isNullOrUndefined(args.element.parentElement.querySelector('.e-cell-vertical-split')))) {
|
|
2743
2744
|
const listEle = args.element.querySelectorAll('li');
|
|
2744
2745
|
if (this.parent.inputElement.querySelectorAll('.e-cell-select').length === 1) {
|
|
2745
2746
|
addClass([listEle[0]], 'e-disabled');
|
|
@@ -3591,6 +3592,11 @@ class DropDownButtons {
|
|
|
3591
3592
|
for (const prop of Object.keys(newProp)) {
|
|
3592
3593
|
switch (prop) {
|
|
3593
3594
|
case 'fontFamily':
|
|
3595
|
+
if (this.parent.inlineMode.enable) {
|
|
3596
|
+
if (!isNullOrUndefined(this.parent.fontFamily.default)) {
|
|
3597
|
+
this.getEditNode().style.fontFamily = this.parent.fontFamily.default;
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3594
3600
|
if (this.fontNameDropDown) {
|
|
3595
3601
|
for (const fontFamily$$1 of Object.keys(newProp.fontFamily)) {
|
|
3596
3602
|
switch (fontFamily$$1) {
|
|
@@ -3621,6 +3627,11 @@ class DropDownButtons {
|
|
|
3621
3627
|
}
|
|
3622
3628
|
break;
|
|
3623
3629
|
case 'fontSize':
|
|
3630
|
+
if (this.parent.inlineMode) {
|
|
3631
|
+
if (!isNullOrUndefined(this.parent.fontSize.default)) {
|
|
3632
|
+
this.getEditNode().style.fontSize = this.parent.fontSize.default;
|
|
3633
|
+
}
|
|
3634
|
+
}
|
|
3624
3635
|
if (this.fontSizeDropDown) {
|
|
3625
3636
|
for (const fontSize$$1 of Object.keys(newProp.fontSize)) {
|
|
3626
3637
|
switch (fontSize$$1) {
|
|
@@ -4707,12 +4718,12 @@ class Toolbar$2 {
|
|
|
4707
4718
|
}
|
|
4708
4719
|
}
|
|
4709
4720
|
|
|
4710
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4711
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4712
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4713
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4714
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4715
|
-
};
|
|
4721
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
4722
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4723
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4724
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4725
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4726
|
+
};
|
|
4716
4727
|
var KeyboardEvents_1;
|
|
4717
4728
|
const keyCode = {
|
|
4718
4729
|
'backspace': 8,
|
|
@@ -5649,6 +5660,11 @@ class QuickToolbar {
|
|
|
5649
5660
|
this.parent.isBlur = false;
|
|
5650
5661
|
this.parent.isRTE = true;
|
|
5651
5662
|
}
|
|
5663
|
+
keyUpQT(e) {
|
|
5664
|
+
if (e.which == 27) {
|
|
5665
|
+
this.hideQuickToolbars();
|
|
5666
|
+
}
|
|
5667
|
+
}
|
|
5652
5668
|
renderQuickToolbars() {
|
|
5653
5669
|
if (this.linkQTBar || this.imageQTBar || this.textQTBar || this.tableQTBar) {
|
|
5654
5670
|
return;
|
|
@@ -5663,15 +5679,19 @@ class QuickToolbar {
|
|
|
5663
5679
|
this.renderFactory.addRenderer(RenderType.TableToolbar, this.tableQTBar);
|
|
5664
5680
|
if (this.linkQTBar) {
|
|
5665
5681
|
EventHandler.add(this.linkQTBar.element, 'mousedown', this.onMouseDown, this);
|
|
5682
|
+
EventHandler.add(this.linkQTBar.element, 'keyup', this.keyUpQT, this);
|
|
5666
5683
|
}
|
|
5667
5684
|
if (this.imageQTBar) {
|
|
5668
5685
|
EventHandler.add(this.imageQTBar.element, 'mousedown', this.onMouseDown, this);
|
|
5686
|
+
EventHandler.add(this.imageQTBar.element, 'keyup', this.keyUpQT, this);
|
|
5669
5687
|
}
|
|
5670
5688
|
if (this.textQTBar) {
|
|
5671
5689
|
EventHandler.add(this.textQTBar.element, 'mousedown', this.onMouseDown, this);
|
|
5690
|
+
EventHandler.add(this.textQTBar.element, 'keyup', this.keyUpQT, this);
|
|
5672
5691
|
}
|
|
5673
5692
|
if (this.tableQTBar) {
|
|
5674
5693
|
EventHandler.add(this.tableQTBar.element, 'mousedown', this.onMouseDown, this);
|
|
5694
|
+
EventHandler.add(this.tableQTBar.element, 'keyup', this.keyUpQT, this);
|
|
5675
5695
|
}
|
|
5676
5696
|
}
|
|
5677
5697
|
renderInlineQuickToolbar() {
|
|
@@ -5680,6 +5700,7 @@ class QuickToolbar {
|
|
|
5680
5700
|
this.inlineQTBar = this.createQTBar('Inline', 'MultiRow', this.parent.toolbarSettings.items, RenderType.InlineToolbar);
|
|
5681
5701
|
this.renderFactory.addRenderer(RenderType.InlineToolbar, this.inlineQTBar);
|
|
5682
5702
|
EventHandler.add(this.inlineQTBar.element, 'mousedown', this.onMouseDown, this);
|
|
5703
|
+
EventHandler.add(this.inlineQTBar.element, 'keyup', this.keyUpQT, this);
|
|
5683
5704
|
}
|
|
5684
5705
|
}
|
|
5685
5706
|
/**
|
|
@@ -5761,7 +5782,10 @@ class QuickToolbar {
|
|
|
5761
5782
|
else {
|
|
5762
5783
|
const closestAnchor = closest(target, 'a');
|
|
5763
5784
|
target = closestAnchor ? closestAnchor : target;
|
|
5764
|
-
|
|
5785
|
+
const startNode = this.parent.getRange().startContainer.parentElement;
|
|
5786
|
+
const endNode = this.parent.getRange().endContainer.parentElement;
|
|
5787
|
+
if ((isNullOrUndefined(closest(startNode, 'A')) || isNullOrUndefined(closest(endNode, 'A'))) && (!closest(target, 'td,th') || !range.collapsed) &&
|
|
5788
|
+
(target.tagName !== 'IMG' || this.parent.getRange().startOffset !== this.parent.getRange().endOffset)) {
|
|
5765
5789
|
if (this.parent.inlineMode.onSelection && range.collapsed) {
|
|
5766
5790
|
return;
|
|
5767
5791
|
}
|
|
@@ -5829,22 +5853,27 @@ class QuickToolbar {
|
|
|
5829
5853
|
destroy() {
|
|
5830
5854
|
if (this.linkQTBar) {
|
|
5831
5855
|
EventHandler.remove(this.linkQTBar.element, 'mousedown', this.onMouseDown);
|
|
5856
|
+
EventHandler.remove(this.linkQTBar.element, 'keyup', this.keyUpQT);
|
|
5832
5857
|
this.linkQTBar.destroy();
|
|
5833
5858
|
}
|
|
5834
5859
|
if (this.textQTBar) {
|
|
5835
5860
|
EventHandler.remove(this.textQTBar.element, 'mousedown', this.onMouseDown);
|
|
5861
|
+
EventHandler.remove(this.textQTBar.element, 'keyup', this.keyUpQT);
|
|
5836
5862
|
this.textQTBar.destroy();
|
|
5837
5863
|
}
|
|
5838
5864
|
if (this.imageQTBar) {
|
|
5839
5865
|
EventHandler.remove(this.imageQTBar.element, 'mousedown', this.onMouseDown);
|
|
5866
|
+
EventHandler.remove(this.imageQTBar.element, 'keyup', this.keyUpQT);
|
|
5840
5867
|
this.imageQTBar.destroy();
|
|
5841
5868
|
}
|
|
5842
5869
|
if (this.tableQTBar) {
|
|
5843
5870
|
EventHandler.remove(this.tableQTBar.element, 'mousedown', this.onMouseDown);
|
|
5871
|
+
EventHandler.remove(this.tableQTBar.element, 'keyup', this.keyUpQT);
|
|
5844
5872
|
this.tableQTBar.destroy();
|
|
5845
5873
|
}
|
|
5846
5874
|
if (this.inlineQTBar) {
|
|
5847
5875
|
EventHandler.remove(this.inlineQTBar.element, 'mousedown', this.onMouseDown);
|
|
5876
|
+
EventHandler.remove(this.inlineQTBar.element, 'keyup', this.keyUpQT);
|
|
5848
5877
|
if (isIDevice()) {
|
|
5849
5878
|
EventHandler.remove(document, 'selectionchange', this.selectionChangeHandler);
|
|
5850
5879
|
}
|
|
@@ -6824,7 +6853,7 @@ class Formatter {
|
|
|
6824
6853
|
|| ((args.item.subCommand === 'FontName' || args.item.subCommand === 'FontSize') && args.name === 'dropDownSelect')
|
|
6825
6854
|
|| ((args.item.subCommand === 'BackgroundColor' || args.item.subCommand === 'FontColor')
|
|
6826
6855
|
&& args.name === 'colorPickerChanged'))) {
|
|
6827
|
-
extend(args, args, { requestType: args.item.subCommand, cancel: false, itemCollection: value }, true);
|
|
6856
|
+
extend(args, args, { requestType: args.item.subCommand, cancel: false, itemCollection: value, selectType: args.name }, true);
|
|
6828
6857
|
self.trigger(actionBegin, args, (actionBeginArgs) => {
|
|
6829
6858
|
if (!actionBeginArgs.cancel) {
|
|
6830
6859
|
if (this.getUndoRedoStack().length === 0 && actionBeginArgs.item.command !== 'Links'
|
|
@@ -6842,8 +6871,8 @@ class Formatter {
|
|
|
6842
6871
|
}
|
|
6843
6872
|
else {
|
|
6844
6873
|
this.editorManager.observer.notify(checkUndo, { subCommand: actionBeginArgs.item.subCommand });
|
|
6845
|
-
this.editorManager.execCommand(actionBeginArgs.item.command, actionBeginArgs.item.subCommand, event, this.onSuccess.bind(this, self), actionBeginArgs.item.value, actionBeginArgs.item.subCommand === 'Pre' &&
|
|
6846
|
-
{ name:
|
|
6874
|
+
this.editorManager.execCommand(actionBeginArgs.item.command, actionBeginArgs.item.subCommand, event, this.onSuccess.bind(this, self), actionBeginArgs.item.value, actionBeginArgs.item.subCommand === 'Pre' && actionBeginArgs.selectType === 'dropDownSelect' ?
|
|
6875
|
+
{ name: actionBeginArgs.selectType } : value, ('#' + self.getID() + ' iframe'), self.enterKey);
|
|
6847
6876
|
}
|
|
6848
6877
|
}
|
|
6849
6878
|
});
|
|
@@ -9314,7 +9343,8 @@ class NodeSelection {
|
|
|
9314
9343
|
|| range.startContainer;
|
|
9315
9344
|
const endNode = range.endContainer.childNodes[(range.endOffset > 0) ? (range.endOffset - 1) : range.endOffset]
|
|
9316
9345
|
|| range.endContainer;
|
|
9317
|
-
if (startNode === endNode && startNode.childNodes.
|
|
9346
|
+
if ((startNode === endNode || (startNode.nodeName === 'BR' && startNode === range.endContainer.childNodes[range.endOffset])) &&
|
|
9347
|
+
startNode.childNodes.length === 0) {
|
|
9318
9348
|
return [startNode];
|
|
9319
9349
|
}
|
|
9320
9350
|
if (range.startOffset === range.endOffset && range.startOffset !== 0 && range.startContainer.nodeName === 'PRE') {
|
|
@@ -12168,7 +12198,17 @@ class InsertHtml {
|
|
|
12168
12198
|
tempSpan.parentNode.replaceChild(node, tempSpan);
|
|
12169
12199
|
}
|
|
12170
12200
|
else {
|
|
12171
|
-
|
|
12201
|
+
let currentNode = nodes[nodes.length - 1];
|
|
12202
|
+
let splitedElm;
|
|
12203
|
+
if ((currentNode.nodeName === 'BR' || currentNode.nodeName === 'HR') && !isNullOrUndefined(currentNode.parentElement) &&
|
|
12204
|
+
currentNode.parentElement.textContent.trim().length === 0 && !node.classList.contains('pasteContent')) {
|
|
12205
|
+
//let newChildElem: HTMLElement = createElement(currentNode.nodeName);
|
|
12206
|
+
//currentNode.parentElement.insertBefore(newChildElem, currentNode);
|
|
12207
|
+
splitedElm = currentNode;
|
|
12208
|
+
}
|
|
12209
|
+
else {
|
|
12210
|
+
splitedElm = nodeCutter.GetSpliceNode(range, blockNode);
|
|
12211
|
+
}
|
|
12172
12212
|
splitedElm.parentNode.replaceChild(node, splitedElm);
|
|
12173
12213
|
}
|
|
12174
12214
|
}
|
|
@@ -14415,7 +14455,24 @@ class SelectionCommands {
|
|
|
14415
14455
|
}
|
|
14416
14456
|
}
|
|
14417
14457
|
}
|
|
14418
|
-
|
|
14458
|
+
if ((['fontcolor', 'fontname', 'fontsize', 'backgroundcolor'].indexOf(format) > -1)) {
|
|
14459
|
+
if (format === 'fontcolor') {
|
|
14460
|
+
cursorFormat.style.color = value;
|
|
14461
|
+
}
|
|
14462
|
+
else if (format === 'fontname') {
|
|
14463
|
+
cursorFormat.style.fontFamily = value;
|
|
14464
|
+
}
|
|
14465
|
+
else if (format === 'fontsize') {
|
|
14466
|
+
cursorFormat.style.fontSize = value;
|
|
14467
|
+
}
|
|
14468
|
+
else {
|
|
14469
|
+
cursorFormat.style.backgroundColor = value;
|
|
14470
|
+
}
|
|
14471
|
+
cursorNode = cursorFormat;
|
|
14472
|
+
}
|
|
14473
|
+
else {
|
|
14474
|
+
InsertMethods.unwrap(cursorFormat);
|
|
14475
|
+
}
|
|
14419
14476
|
}
|
|
14420
14477
|
else {
|
|
14421
14478
|
if (cursorNodes.length > 1 && range.startOffset > 0 && (cursorNodes[0].firstElementChild &&
|
|
@@ -16692,98 +16749,98 @@ class ContentRender {
|
|
|
16692
16749
|
}
|
|
16693
16750
|
}
|
|
16694
16751
|
|
|
16695
|
-
const IFRAMEHEADER = `
|
|
16696
|
-
<!DOCTYPE html>
|
|
16697
|
-
<html>
|
|
16698
|
-
<head>
|
|
16699
|
-
<meta charset='utf-8' />
|
|
16700
|
-
<style>
|
|
16701
|
-
@charset "UTF-8";
|
|
16702
|
-
body {
|
|
16703
|
-
font-family: "Roboto", sans-serif;
|
|
16704
|
-
font-size: 14px;
|
|
16705
|
-
}
|
|
16706
|
-
html, body{height: 100%;margin: 0;}
|
|
16707
|
-
body.e-cursor{cursor:default}
|
|
16708
|
-
span.e-selected-node {background-color: #939393;color: white;}
|
|
16709
|
-
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
16710
|
-
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
16711
|
-
.e-rte-image {border: 0;cursor: pointer;display:
|
|
16712
|
-
block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16713
|
-
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
16714
|
-
.e-img-caption.e-caption-inline {display: inline-block;float: none;
|
|
16715
|
-
margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
|
|
16716
|
-
position: relativetext-align: center;vertical-align: bottom;}
|
|
16717
|
-
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
|
|
16718
|
-
margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
16719
|
-
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
16720
|
-
.e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
16721
|
-
.e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
16722
|
-
.e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16723
|
-
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
16724
|
-
.e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
|
|
16725
|
-
max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
16726
|
-
.e-imgbreak {border: 0;cursor: pointer;
|
|
16727
|
-
display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16728
|
-
.e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
16729
|
-
img.e-img-focus::selection { background: transparent;color: transparent;}
|
|
16730
|
-
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;
|
|
16731
|
-
background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
16732
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
16733
|
-
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;
|
|
16734
|
-
border-radius: 15px; height: 20px; width: 20px; }
|
|
16735
|
-
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
16736
|
-
.e-rte-content .e-content img.e-resize { z-index: 1000; }
|
|
16737
|
-
.e-img-caption .e-img-inner { outline: 0; }
|
|
16738
|
-
.e-img-caption a:focus-visible { outline: none; }
|
|
16739
|
-
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
16740
|
-
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
|
|
16741
|
-
overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
16742
|
-
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
16743
|
-
li{margin-bottom: 10px;}
|
|
16744
|
-
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
16745
|
-
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
16746
|
-
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
16747
|
-
h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}
|
|
16748
|
-
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
16749
|
-
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
16750
|
-
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
16751
|
-
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
|
|
16752
|
-
font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
|
|
16753
|
-
white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
16754
|
-
strong, b{font-weight: 700;}
|
|
16755
|
-
a{text-decoration: none;user-select: auto;}
|
|
16756
|
-
a:hover{text-decoration: underline;};
|
|
16757
|
-
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
16758
|
-
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
16759
|
-
ul:last-child{margin-bottom: 0;}
|
|
16760
|
-
table { border-collapse: collapse; empty-cells: show;}
|
|
16761
|
-
table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}
|
|
16762
|
-
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
16763
|
-
table th {background-color: #E0E0E0;}
|
|
16764
|
-
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
16765
|
-
table .e-cell-select {border: 1px double #4a90e2;}
|
|
16766
|
-
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
16767
|
-
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
16768
|
-
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
|
|
16769
|
-
bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
16770
|
-
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
16771
|
-
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
16772
|
-
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
16773
|
-
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
16774
|
-
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
|
|
16775
|
-
border-top: 6px solid transparent; content: ''; display: block; height: 0;
|
|
16776
|
-
position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
16777
|
-
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
|
|
16778
|
-
border-top: 6px solid transparent; content: ''; display: block;
|
|
16779
|
-
height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
16780
|
-
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
16781
|
-
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
16782
|
-
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
16783
|
-
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
16784
|
-
.e-table-rhelper { background-color: #4a90e2;}
|
|
16785
|
-
.e-rtl { direction: rtl; }
|
|
16786
|
-
</style>
|
|
16752
|
+
const IFRAMEHEADER = `
|
|
16753
|
+
<!DOCTYPE html>
|
|
16754
|
+
<html>
|
|
16755
|
+
<head>
|
|
16756
|
+
<meta charset='utf-8' />
|
|
16757
|
+
<style>
|
|
16758
|
+
@charset "UTF-8";
|
|
16759
|
+
body {
|
|
16760
|
+
font-family: "Roboto", sans-serif;
|
|
16761
|
+
font-size: 14px;
|
|
16762
|
+
}
|
|
16763
|
+
html, body{height: 100%;margin: 0;}
|
|
16764
|
+
body.e-cursor{cursor:default}
|
|
16765
|
+
span.e-selected-node {background-color: #939393;color: white;}
|
|
16766
|
+
span.e-selected-node.e-highlight {background-color: #1d9dd8;}
|
|
16767
|
+
body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}
|
|
16768
|
+
.e-rte-image {border: 0;cursor: pointer;display:
|
|
16769
|
+
block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16770
|
+
.e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}
|
|
16771
|
+
.e-img-caption.e-caption-inline {display: inline-block;float: none;
|
|
16772
|
+
margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));
|
|
16773
|
+
position: relativetext-align: center;vertical-align: bottom;}
|
|
16774
|
+
.e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;
|
|
16775
|
+
margin: auto;opacity: .9;text-align: center;width: 100%;}
|
|
16776
|
+
.e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}
|
|
16777
|
+
.e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}
|
|
16778
|
+
.e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}
|
|
16779
|
+
.e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16780
|
+
.e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}
|
|
16781
|
+
.e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;
|
|
16782
|
+
max-width: calc(100% - (2 * 5px));vertical-align: bottom;}
|
|
16783
|
+
.e-imgbreak {border: 0;cursor: pointer;
|
|
16784
|
+
display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}
|
|
16785
|
+
.e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}
|
|
16786
|
+
img.e-img-focus::selection { background: transparent;color: transparent;}
|
|
16787
|
+
span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;
|
|
16788
|
+
background: #4a90e2; border: 1px solid #fff; z-index: 1000;}
|
|
16789
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
16790
|
+
.e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;
|
|
16791
|
+
border-radius: 15px; height: 20px; width: 20px; }
|
|
16792
|
+
.e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }
|
|
16793
|
+
.e-rte-content .e-content img.e-resize { z-index: 1000; }
|
|
16794
|
+
.e-img-caption .e-img-inner { outline: 0; }
|
|
16795
|
+
.e-img-caption a:focus-visible { outline: none; }
|
|
16796
|
+
.e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}
|
|
16797
|
+
body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;
|
|
16798
|
+
overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}
|
|
16799
|
+
p{margin: 0 0 10px;margin-bottom: 10px;}
|
|
16800
|
+
li{margin-bottom: 10px;}
|
|
16801
|
+
h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}
|
|
16802
|
+
h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}
|
|
16803
|
+
h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}
|
|
16804
|
+
h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}
|
|
16805
|
+
h5{font-size: 00.8em;font-weight: 400;margin: 0;}
|
|
16806
|
+
h6{font-size: 00.65em;font-weight: 400;margin: 0;}
|
|
16807
|
+
blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}
|
|
16808
|
+
pre{background-color: inherit;border: 0;border-radius: 0;color: #333;
|
|
16809
|
+
font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;
|
|
16810
|
+
white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}
|
|
16811
|
+
strong, b{font-weight: 700;}
|
|
16812
|
+
a{text-decoration: none;user-select: auto;}
|
|
16813
|
+
a:hover{text-decoration: underline;};
|
|
16814
|
+
p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}
|
|
16815
|
+
h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}
|
|
16816
|
+
ul:last-child{margin-bottom: 0;}
|
|
16817
|
+
table { border-collapse: collapse; empty-cells: show;}
|
|
16818
|
+
table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}
|
|
16819
|
+
table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}
|
|
16820
|
+
table th {background-color: #E0E0E0;}
|
|
16821
|
+
table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD}
|
|
16822
|
+
table .e-cell-select {border: 1px double #4a90e2;}
|
|
16823
|
+
span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }
|
|
16824
|
+
span.e-table-box.e-rmob {height: 14px;width: 14px;}
|
|
16825
|
+
.e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;
|
|
16826
|
+
bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }
|
|
16827
|
+
.e-row-resize { cursor: row-resize; height: 1px;}
|
|
16828
|
+
.e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}
|
|
16829
|
+
.e-table-rhelper.e-column-helper { width: 1px; }
|
|
16830
|
+
.e-table-rhelper.e-row-helper {height: 1px;}
|
|
16831
|
+
.e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;
|
|
16832
|
+
border-top: 6px solid transparent; content: ''; display: block; height: 0;
|
|
16833
|
+
position: absolute; right: 4px; top: 4px; width: 20px; }
|
|
16834
|
+
.e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;
|
|
16835
|
+
border-top: 6px solid transparent; content: ''; display: block;
|
|
16836
|
+
height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }
|
|
16837
|
+
.e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }
|
|
16838
|
+
.e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }
|
|
16839
|
+
span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }
|
|
16840
|
+
span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }
|
|
16841
|
+
.e-table-rhelper { background-color: #4a90e2;}
|
|
16842
|
+
.e-rtl { direction: rtl; }
|
|
16843
|
+
</style>
|
|
16787
16844
|
</head>`;
|
|
16788
16845
|
/**
|
|
16789
16846
|
* Content module is used to render Rich Text Editor content
|
|
@@ -19376,7 +19433,8 @@ class Link {
|
|
|
19376
19433
|
this.contentModule = this.rendererFactory.getRenderer(RenderType.Content);
|
|
19377
19434
|
const isPopupOpen = this.quickToolObj.linkQTBar.element.classList.contains('e-rte-pop');
|
|
19378
19435
|
if (target.nodeName === 'A' && (target.childNodes.length > 0 && target.childNodes[0].nodeName !== 'IMG') &&
|
|
19379
|
-
e.args.target.nodeName !== 'IMG'
|
|
19436
|
+
e.args.target.nodeName !== 'IMG' &&
|
|
19437
|
+
!isNullOrUndefined(closest(this.parent.getRange().startContainer.parentElement, 'A')) && !isNullOrUndefined(closest(this.parent.getRange().endContainer.parentElement, 'A'))) {
|
|
19380
19438
|
if (isPopupOpen) {
|
|
19381
19439
|
return;
|
|
19382
19440
|
}
|
|
@@ -20551,7 +20609,7 @@ class Image {
|
|
|
20551
20609
|
const target = args.target;
|
|
20552
20610
|
this.contentModule = this.rendererFactory.getRenderer(RenderType.Content);
|
|
20553
20611
|
const isPopupOpen = this.quickToolObj.imageQTBar.element.classList.contains('e-rte-pop');
|
|
20554
|
-
if (target.nodeName === 'IMG' && this.parent.quickToolbarModule) {
|
|
20612
|
+
if (target.nodeName === 'IMG' && this.parent.quickToolbarModule && this.parent.getRange().startOffset === this.parent.getRange().endOffset) {
|
|
20555
20613
|
if (isPopupOpen) {
|
|
20556
20614
|
return;
|
|
20557
20615
|
}
|
|
@@ -20788,13 +20846,34 @@ class Image {
|
|
|
20788
20846
|
}
|
|
20789
20847
|
}
|
|
20790
20848
|
imageRemovePost(src) {
|
|
20849
|
+
const proxy = this;
|
|
20850
|
+
let absoluteUrl = '';
|
|
20851
|
+
if (src.indexOf('http://') > -1 || src.indexOf('https://') > -1) {
|
|
20852
|
+
absoluteUrl = src;
|
|
20853
|
+
}
|
|
20854
|
+
else {
|
|
20855
|
+
absoluteUrl = new URL(src, document.baseURI).href;
|
|
20856
|
+
}
|
|
20857
|
+
this.removingImgName = absoluteUrl.replace(/^.*[\\\/]/, '');
|
|
20858
|
+
const xhr = new XMLHttpRequest();
|
|
20859
|
+
xhr.addEventListener("readystatechange", function () {
|
|
20860
|
+
if (this.readyState == 4 && this.status == 200) {
|
|
20861
|
+
proxy.triggerPost(this.response);
|
|
20862
|
+
}
|
|
20863
|
+
});
|
|
20864
|
+
xhr.open('GET', absoluteUrl);
|
|
20865
|
+
xhr.responseType = 'blob';
|
|
20866
|
+
xhr.send();
|
|
20867
|
+
}
|
|
20868
|
+
triggerPost(response) {
|
|
20791
20869
|
const removeUrl = this.parent.insertImageSettings.removeUrl;
|
|
20792
20870
|
if (isNullOrUndefined(removeUrl) || removeUrl === '') {
|
|
20793
20871
|
return;
|
|
20794
20872
|
}
|
|
20873
|
+
const file = new File([response], this.removingImgName);
|
|
20795
20874
|
const ajax = new Ajax(removeUrl, 'POST', true, null);
|
|
20796
20875
|
const formData = new FormData();
|
|
20797
|
-
formData.append(
|
|
20876
|
+
formData.append('UploadFiles', file);
|
|
20798
20877
|
ajax.send(formData);
|
|
20799
20878
|
}
|
|
20800
20879
|
caption(e) {
|
|
@@ -22538,7 +22617,9 @@ class Table {
|
|
|
22538
22617
|
}
|
|
22539
22618
|
const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
|
|
22540
22619
|
const closestTable = closest(target, 'table');
|
|
22541
|
-
|
|
22620
|
+
const startNode = this.parent.getRange().startContainer.parentElement;
|
|
22621
|
+
const endNode = this.parent.getRange().endContainer.parentElement;
|
|
22622
|
+
if (target && target.nodeName !== 'A' && target.nodeName !== 'IMG' && startNode === endNode && (target.nodeName === 'TD' || target.nodeName === 'TH' ||
|
|
22542
22623
|
target.nodeName === 'TABLE' || (closestTable && this.parent.contentModule.getEditPanel().contains(closestTable)))
|
|
22543
22624
|
&& !(range.startContainer.nodeType === 3 && !range.collapsed)) {
|
|
22544
22625
|
const range = this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());
|
|
@@ -22625,7 +22706,6 @@ class Table {
|
|
|
22625
22706
|
tdNode : target;
|
|
22626
22707
|
removeClass(this.contentModule.getEditPanel().querySelectorAll('table td, table th'), CLS_TABLE_SEL);
|
|
22627
22708
|
if (target && (target.tagName === 'TD' || target.tagName === 'TH')) {
|
|
22628
|
-
target.removeAttribute('class');
|
|
22629
22709
|
addClass([target], CLS_TABLE_SEL);
|
|
22630
22710
|
this.activeCell = target;
|
|
22631
22711
|
this.curTable = (this.curTable) ? this.curTable : closest(target, 'table');
|
|
@@ -23601,12 +23681,12 @@ const executeGroup = {
|
|
|
23601
23681
|
}
|
|
23602
23682
|
};
|
|
23603
23683
|
|
|
23604
|
-
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23605
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23606
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23607
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23608
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23609
|
-
};
|
|
23684
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23685
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23686
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23687
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23688
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23689
|
+
};
|
|
23610
23690
|
/**
|
|
23611
23691
|
* Configures the toolbar settings of the RichTextEditor.
|
|
23612
23692
|
*/
|
|
@@ -23895,12 +23975,12 @@ __decorate$2([
|
|
|
23895
23975
|
Property(bulletFormatList)
|
|
23896
23976
|
], BulletFormatList.prototype, "types", void 0);
|
|
23897
23977
|
|
|
23898
|
-
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23899
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23900
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23901
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23902
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23903
|
-
};
|
|
23978
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23979
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23980
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23981
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23982
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23983
|
+
};
|
|
23904
23984
|
/**
|
|
23905
23985
|
* Objects used for configuring the iframe resources properties.
|
|
23906
23986
|
*/
|
|
@@ -23927,12 +24007,12 @@ __decorate$3([
|
|
|
23927
24007
|
Complex({}, Resources)
|
|
23928
24008
|
], IFrameSettings.prototype, "resources", void 0);
|
|
23929
24009
|
|
|
23930
|
-
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23931
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23932
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23933
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23934
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23935
|
-
};
|
|
24010
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24011
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24012
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24013
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24014
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24015
|
+
};
|
|
23936
24016
|
/**
|
|
23937
24017
|
* Configures the inlineMode property of the RTE.
|
|
23938
24018
|
*/
|
|
@@ -24073,6 +24153,7 @@ class EnterKeyAction {
|
|
|
24073
24153
|
detach(nearBlockNode);
|
|
24074
24154
|
}
|
|
24075
24155
|
}
|
|
24156
|
+
this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(), insertElem.nextElementSibling, 0);
|
|
24076
24157
|
}
|
|
24077
24158
|
else if (nearBlockNode.textContent.length === 0 && !(!isNullOrUndefined(nearBlockNode.childNodes[0]) && nearBlockNode.childNodes[0].nodeName === 'IMG')) {
|
|
24078
24159
|
if (!isNullOrUndefined(nearBlockNode.children[0]) && nearBlockNode.children[0].tagName !== 'BR') {
|
|
@@ -24219,12 +24300,12 @@ class EnterKeyAction {
|
|
|
24219
24300
|
}
|
|
24220
24301
|
}
|
|
24221
24302
|
|
|
24222
|
-
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24223
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24224
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24225
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24226
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24227
|
-
};
|
|
24303
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
24304
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24305
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24306
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24307
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24308
|
+
};
|
|
24228
24309
|
/**
|
|
24229
24310
|
* Represents the Rich Text Editor component.
|
|
24230
24311
|
* ```html
|
|
@@ -25594,8 +25675,7 @@ let RichTextEditor = class RichTextEditor extends Component {
|
|
|
25594
25675
|
this.setProperties({ value: this.valueTemplate });
|
|
25595
25676
|
}
|
|
25596
25677
|
else {
|
|
25597
|
-
const
|
|
25598
|
-
const compiledTemplate = compiledString({});
|
|
25678
|
+
const compiledTemplate = compile(this.valueTemplate)('', this, 'valueTemplate');
|
|
25599
25679
|
for (let i = 0; i < compiledTemplate.length; i++) {
|
|
25600
25680
|
const item = compiledTemplate[i];
|
|
25601
25681
|
append([item], this.element);
|