@syncfusion/ej2-richtexteditor 20.2.49 → 20.3.47
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 +22 -0
- package/dist/ej2-richtexteditor.min.js +10 -0
- package/dist/ej2-richtexteditor.umd.min.js +2 -2
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +3790 -358
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +3780 -319
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/dist/global/ej2-richtexteditor.min.js +2 -2
- package/dist/global/ej2-richtexteditor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/common/config.js +2 -0
- package/src/common/types.d.ts +4 -0
- package/src/editor-manager/base/classes.d.ts +16 -0
- package/src/editor-manager/base/classes.js +16 -0
- package/src/editor-manager/base/constant.d.ts +2 -0
- package/src/editor-manager/base/constant.js +2 -0
- package/src/editor-manager/base/editor-manager.d.ts +4 -0
- package/src/editor-manager/base/editor-manager.js +14 -0
- package/src/editor-manager/base/interface.d.ts +2 -0
- package/src/editor-manager/plugin/audio.d.ts +32 -0
- package/src/editor-manager/plugin/audio.js +133 -0
- package/src/editor-manager/plugin/dom-node.js +1 -1
- package/src/editor-manager/plugin/image.js +1 -1
- package/src/editor-manager/plugin/inserthtml.js +1 -1
- package/src/editor-manager/plugin/lists.js +10 -8
- package/src/editor-manager/plugin/ms-word-clean-up.js +18 -18
- package/src/editor-manager/plugin/nodecutter.d.ts +1 -1
- package/src/editor-manager/plugin/nodecutter.js +7 -5
- package/src/editor-manager/plugin/selection-commands.js +3 -2
- package/src/editor-manager/plugin/table.js +3 -2
- package/src/editor-manager/plugin/undo.js +2 -1
- package/src/editor-manager/plugin/video.d.ts +34 -0
- package/src/editor-manager/plugin/video.js +249 -0
- package/src/editor-manager/plugin.d.ts +2 -0
- package/src/editor-manager/plugin.js +2 -0
- package/src/global.js +1 -1
- package/src/rich-text-editor/actions/base-quick-toolbar.js +3 -1
- package/src/rich-text-editor/actions/base-toolbar.js +1 -1
- package/src/rich-text-editor/actions/dropdown-buttons.d.ts +2 -2
- package/src/rich-text-editor/actions/dropdown-buttons.js +14 -11
- package/src/rich-text-editor/actions/enter-key.d.ts +1 -0
- package/src/rich-text-editor/actions/enter-key.js +157 -103
- package/src/rich-text-editor/actions/html-editor.d.ts +1 -0
- package/src/rich-text-editor/actions/html-editor.js +59 -1
- package/src/rich-text-editor/actions/paste-clean-up.js +2 -1
- package/src/rich-text-editor/actions/quick-toolbar.d.ts +2 -0
- package/src/rich-text-editor/actions/quick-toolbar.js +52 -6
- package/src/rich-text-editor/actions/resize.js +11 -1
- package/src/rich-text-editor/actions/toolbar-action.js +2 -1
- package/src/rich-text-editor/actions/xhtml-validation.js +1 -1
- package/src/rich-text-editor/audio.d.ts +4 -0
- package/src/rich-text-editor/audio.js +4 -0
- package/src/rich-text-editor/base/classes.d.ts +50 -0
- package/src/rich-text-editor/base/classes.js +50 -0
- package/src/rich-text-editor/base/constant.d.ts +74 -14
- package/src/rich-text-editor/base/constant.js +76 -16
- package/src/rich-text-editor/base/enum.d.ts +10 -2
- package/src/rich-text-editor/base/enum.js +10 -2
- package/src/rich-text-editor/base/interface.d.ts +86 -2
- package/src/rich-text-editor/base/interface.js +8 -0
- package/src/rich-text-editor/base/rich-text-editor-model.d.ts +130 -29
- package/src/rich-text-editor/base/rich-text-editor.d.ts +150 -30
- package/src/rich-text-editor/base/rich-text-editor.js +200 -6
- package/src/rich-text-editor/formatter/formatter.js +7 -2
- package/src/rich-text-editor/models/default-locale.js +46 -0
- package/src/rich-text-editor/models/items.d.ts +3 -0
- package/src/rich-text-editor/models/items.js +100 -3
- package/src/rich-text-editor/models/toolbar-settings-model.d.ts +169 -1
- package/src/rich-text-editor/models/toolbar-settings.d.ts +143 -1
- package/src/rich-text-editor/models/toolbar-settings.js +88 -0
- package/src/rich-text-editor/renderer/audio-module.d.ts +76 -0
- package/src/rich-text-editor/renderer/audio-module.js +875 -0
- package/src/rich-text-editor/renderer/iframe-content-renderer.js +1 -1
- package/src/rich-text-editor/renderer/image-module.js +9 -6
- package/src/rich-text-editor/renderer/link-module.js +2 -1
- package/src/rich-text-editor/renderer/table-module.d.ts +2 -0
- package/src/rich-text-editor/renderer/table-module.js +43 -7
- package/src/rich-text-editor/renderer/video-module.d.ts +105 -0
- package/src/rich-text-editor/renderer/video-module.js +1422 -0
- package/src/rich-text-editor/renderer/view-source.js +2 -0
- package/src/rich-text-editor/renderer.d.ts +2 -0
- package/src/rich-text-editor/renderer.js +2 -0
- package/src/rich-text-editor/video.d.ts +4 -0
- package/src/rich-text-editor/video.js +4 -0
- package/styles/_all.scss +1 -2
- package/styles/bootstrap-dark.css +220 -70
- package/styles/bootstrap.css +220 -70
- package/styles/bootstrap4.css +220 -70
- package/styles/bootstrap5-dark.css +220 -70
- package/styles/bootstrap5.css +220 -70
- package/styles/fabric-dark.css +220 -70
- package/styles/fabric.css +222 -72
- package/styles/fluent-dark.css +222 -72
- package/styles/fluent.css +222 -72
- package/styles/highcontrast-light.css +222 -72
- package/styles/highcontrast.css +222 -72
- package/styles/material-dark.css +220 -70
- package/styles/material.css +220 -70
- package/styles/rich-text-editor/_all.scss +1 -1
- package/styles/rich-text-editor/_bootstrap-dark-definition.scss +3 -0
- package/styles/rich-text-editor/_bootstrap-definition.scss +2 -1
- package/styles/rich-text-editor/_bootstrap4-definition.scss +5 -3
- package/styles/rich-text-editor/_bootstrap5-definition.scss +8 -3
- package/styles/rich-text-editor/_fabric-dark-definition.scss +3 -0
- package/styles/rich-text-editor/_fabric-definition.scss +2 -0
- package/styles/rich-text-editor/_fluent-definition.scss +8 -3
- package/styles/rich-text-editor/_fusionnew-definition.scss +8 -3
- package/styles/rich-text-editor/_highcontrast-definition.scss +2 -0
- package/styles/rich-text-editor/_highcontrast-light-definition.scss +2 -0
- package/styles/rich-text-editor/_layout.scss +116 -74
- package/styles/rich-text-editor/_material-dark-definition.scss +3 -0
- package/styles/rich-text-editor/_material-definition.scss +2 -0
- package/styles/rich-text-editor/_material3-definition.scss +8 -3
- package/styles/rich-text-editor/_tailwind-definition.scss +7 -2
- package/styles/rich-text-editor/_theme.scss +74 -15
- package/styles/rich-text-editor/bootstrap-dark.css +220 -70
- package/styles/rich-text-editor/bootstrap.css +220 -70
- package/styles/rich-text-editor/bootstrap4.css +220 -70
- package/styles/rich-text-editor/bootstrap5-dark.css +220 -70
- package/styles/rich-text-editor/bootstrap5.css +220 -70
- package/styles/rich-text-editor/fabric-dark.css +220 -70
- package/styles/rich-text-editor/fabric.css +222 -72
- package/styles/rich-text-editor/fluent-dark.css +222 -72
- package/styles/rich-text-editor/fluent.css +222 -72
- package/styles/rich-text-editor/highcontrast-light.css +222 -72
- package/styles/rich-text-editor/highcontrast.css +222 -72
- package/styles/rich-text-editor/icons/_bootstrap-dark.scss +20 -4
- package/styles/rich-text-editor/icons/_bootstrap.scss +20 -4
- package/styles/rich-text-editor/icons/_bootstrap4.scss +20 -4
- package/styles/rich-text-editor/icons/_bootstrap5.scss +20 -4
- package/styles/rich-text-editor/icons/_fabric-dark.scss +20 -4
- package/styles/rich-text-editor/icons/_fabric.scss +20 -4
- package/styles/rich-text-editor/icons/_fluent.scss +20 -4
- package/styles/rich-text-editor/icons/_fusionnew.scss +20 -4
- package/styles/rich-text-editor/icons/_highcontrast-light.scss +20 -4
- package/styles/rich-text-editor/icons/_highcontrast.scss +20 -4
- package/styles/rich-text-editor/icons/_material-dark.scss +20 -4
- package/styles/rich-text-editor/icons/_material.scss +20 -4
- package/styles/rich-text-editor/icons/_material3.scss +20 -4
- package/styles/rich-text-editor/icons/_tailwind.scss +20 -4
- package/styles/rich-text-editor/material-dark.css +220 -70
- package/styles/rich-text-editor/material.css +220 -70
- package/styles/rich-text-editor/tailwind-dark.css +220 -70
- package/styles/rich-text-editor/tailwind.css +220 -70
- package/styles/tailwind-dark.css +220 -70
- package/styles/tailwind.css +220 -70
- package/.eslintrc.json +0 -244
- package/tslint.json +0 -111
|
@@ -44,7 +44,7 @@ import { RendererFactory } from '../services/renderer-factory';
|
|
|
44
44
|
import { RenderType, ToolbarType, DialogType } from './enum';
|
|
45
45
|
import { ExecCommandCallBack } from '../actions/execute-command-callback';
|
|
46
46
|
import { KeyboardEvents } from '../actions/keyboard';
|
|
47
|
-
import { ToolbarSettings, ImageSettings, QuickToolbarSettings, FontFamily, FontSize, Format, NumberFormatList, BulletFormatList } from '../models/toolbar-settings';
|
|
47
|
+
import { ToolbarSettings, ImageSettings, AudioSettings, VideoSettings, QuickToolbarSettings, FontFamily, FontSize, Format, NumberFormatList, BulletFormatList } from '../models/toolbar-settings';
|
|
48
48
|
import { FileManagerSettings } from '../models/toolbar-settings';
|
|
49
49
|
import { TableSettings, PasteCleanupSettings } from '../models/toolbar-settings';
|
|
50
50
|
import { FontColor, BackgroundColor } from '../models/toolbar-settings';
|
|
@@ -110,6 +110,14 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
110
110
|
if (this.editorMode === 'HTML') {
|
|
111
111
|
modules.push({ member: 'htmlEditor', args: [this, this.serviceLocator] });
|
|
112
112
|
modules.push({ member: 'pasteCleanup', args: [this, this.serviceLocator] });
|
|
113
|
+
modules.push({
|
|
114
|
+
member: 'audio',
|
|
115
|
+
args: [this, this.serviceLocator]
|
|
116
|
+
});
|
|
117
|
+
modules.push({
|
|
118
|
+
member: 'video',
|
|
119
|
+
args: [this, this.serviceLocator]
|
|
120
|
+
});
|
|
113
121
|
}
|
|
114
122
|
if (this.fileManagerSettings.enable) {
|
|
115
123
|
modules.push({ member: 'fileManager', args: [this, this.serviceLocator] });
|
|
@@ -418,6 +426,64 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
418
426
|
}
|
|
419
427
|
break;
|
|
420
428
|
}
|
|
429
|
+
case 'insertAudio': {
|
|
430
|
+
var wrapTemp = this.createElement('audio', {
|
|
431
|
+
attrs: {
|
|
432
|
+
controls: ''
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
var temp = this.createElement('source', {
|
|
436
|
+
attrs: {
|
|
437
|
+
src: value.url,
|
|
438
|
+
type: value.url && value.url.split('.').length > 0
|
|
439
|
+
? 'audio/' + value.url.split('.')[value.url.split('.').length - 1] : ''
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
wrapTemp.appendChild(temp);
|
|
443
|
+
var audioValue = wrapTemp.outerHTML;
|
|
444
|
+
if (this.enableHtmlSanitizer) {
|
|
445
|
+
audioValue = this.htmlEditorModule.sanitizeHelper(wrapTemp.outerHTML);
|
|
446
|
+
}
|
|
447
|
+
var url = (audioValue !== '' && (this.createElement('div', {
|
|
448
|
+
innerHTML: audioValue
|
|
449
|
+
}).firstElementChild.firstElementChild).getAttribute('src')) || null;
|
|
450
|
+
url = !isNOU(url) ? url : '';
|
|
451
|
+
value.url = url;
|
|
452
|
+
break;
|
|
453
|
+
}
|
|
454
|
+
case 'insertVideo': {
|
|
455
|
+
var wrapTemp = this.createElement('video', {
|
|
456
|
+
attrs: {
|
|
457
|
+
controls: ''
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
var temp = this.createElement('source', {
|
|
461
|
+
attrs: {
|
|
462
|
+
src: value.url,
|
|
463
|
+
type: value.url && value.url.split('.').length > 0
|
|
464
|
+
? 'video/' + value.url.split('.')[value.url.split('.').length - 1] : ''
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
wrapTemp.appendChild(temp);
|
|
468
|
+
var audioValue = wrapTemp.outerHTML;
|
|
469
|
+
if (this.enableHtmlSanitizer) {
|
|
470
|
+
audioValue = this.htmlEditorModule.sanitizeHelper(temp.outerHTML);
|
|
471
|
+
}
|
|
472
|
+
var url = (audioValue !== '' && (this.createElement('div', {
|
|
473
|
+
innerHTML: audioValue
|
|
474
|
+
}).firstElementChild).getAttribute('src')) || null;
|
|
475
|
+
url = !isNOU(url) ? url : '';
|
|
476
|
+
value.url = url;
|
|
477
|
+
if (isNOU(value.width)) {
|
|
478
|
+
value.width = { minWidth: this.insertVideoSettings.minWidth,
|
|
479
|
+
maxWidth: this.insertVideoSettings.maxWidth, width: this.insertVideoSettings.width };
|
|
480
|
+
}
|
|
481
|
+
if (isNOU(value.height)) {
|
|
482
|
+
value.height = { minHeight: this.insertVideoSettings.minHeight,
|
|
483
|
+
maxHeight: this.insertVideoSettings.maxHeight, height: this.insertVideoSettings.height };
|
|
484
|
+
}
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
421
487
|
case 'createLink': {
|
|
422
488
|
var tempNode = this.createElement('a', {
|
|
423
489
|
attrs: {
|
|
@@ -478,8 +544,67 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
478
544
|
// eslint-disable-next-line
|
|
479
545
|
(!this.enabled) ? this.unWireEvents() : this.eventInitializer();
|
|
480
546
|
this.notify(events.bindCssClass, { cssClass: this.cssClass });
|
|
547
|
+
this.addAudioVideoWrapper();
|
|
548
|
+
this.notify(events.tableclass, {});
|
|
481
549
|
this.renderComplete();
|
|
482
550
|
};
|
|
551
|
+
/**
|
|
552
|
+
* addAudioVideoWrapper method
|
|
553
|
+
*
|
|
554
|
+
* @returns {void}
|
|
555
|
+
* @hidden
|
|
556
|
+
|
|
557
|
+
*/
|
|
558
|
+
RichTextEditor.prototype.addAudioVideoWrapper = function () {
|
|
559
|
+
var _this = this;
|
|
560
|
+
var insertElem;
|
|
561
|
+
var audioElm = this.element.querySelectorAll('audio');
|
|
562
|
+
for (var i = 0; i < audioElm.length; i++) {
|
|
563
|
+
if (!audioElm[i].classList.contains('e-rte-audio')) {
|
|
564
|
+
audioElm[i].classList.add('e-rte-audio');
|
|
565
|
+
audioElm[i].classList.add(classes.CLS_AUDIOINLINE);
|
|
566
|
+
}
|
|
567
|
+
if (!audioElm[i].parentElement.classList.contains(classes.CLS_CLICKELEM) && !audioElm[i].parentElement.classList.contains(classes.CLS_AUDIOWRAP)) {
|
|
568
|
+
var audioWrapElem = this.createElement('span', { className: classes.CLS_AUDIOWRAP });
|
|
569
|
+
audioWrapElem.contentEditable = 'false';
|
|
570
|
+
var audioInnerWrapElem = this.createElement('span', { className: classes.CLS_CLICKELEM });
|
|
571
|
+
audioWrapElem.appendChild(audioInnerWrapElem);
|
|
572
|
+
audioElm[i].parentNode.insertBefore(audioWrapElem, audioElm[i].nextSibling);
|
|
573
|
+
audioInnerWrapElem.appendChild(audioElm[i]);
|
|
574
|
+
if (audioWrapElem.nextElementSibling === null) {
|
|
575
|
+
insertElem = this.createElement('br');
|
|
576
|
+
audioWrapElem.parentNode.insertBefore(insertElem, audioWrapElem.nextSibling);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
var videoElm = this.element.querySelectorAll('video');
|
|
581
|
+
for (var i = 0; i < videoElm.length; i++) {
|
|
582
|
+
if (!videoElm[i].classList.contains('e-rte-video')) {
|
|
583
|
+
videoElm[i].classList.add('e-rte-video');
|
|
584
|
+
videoElm[i].classList.add(classes.CLS_VIDEOINLINE);
|
|
585
|
+
}
|
|
586
|
+
if (!videoElm[i].parentElement.classList.contains(classes.CLS_CLICKELEM) && !videoElm[i].parentElement.classList.contains(classes.CLS_VIDEOWRAP)) {
|
|
587
|
+
var videoWrapElem = this.createElement('span', { className: classes.CLS_VIDEOWRAP });
|
|
588
|
+
videoWrapElem.contentEditable = 'false';
|
|
589
|
+
videoElm[i].parentNode.insertBefore(videoWrapElem, videoElm[i].nextSibling);
|
|
590
|
+
videoWrapElem.appendChild(videoElm[i]);
|
|
591
|
+
if (videoWrapElem.nextElementSibling === null) {
|
|
592
|
+
insertElem = this.createElement('br');
|
|
593
|
+
videoWrapElem.parentNode.insertBefore(insertElem, videoWrapElem.nextSibling);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (Browser.userAgent.indexOf('Firefox') !== -1) {
|
|
597
|
+
videoElm[i].addEventListener('play', function (args) {
|
|
598
|
+
_this.notify(events.mouseDown, { args: args });
|
|
599
|
+
_this.notify('editAreaClick', { args: args });
|
|
600
|
+
});
|
|
601
|
+
videoElm[i].addEventListener('pause', function (args) {
|
|
602
|
+
_this.notify(events.mouseDown, { args: args });
|
|
603
|
+
_this.notify('editAreaClick', { args: args });
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
};
|
|
483
608
|
/**
|
|
484
609
|
* For internal use only - Initialize the event handler
|
|
485
610
|
*
|
|
@@ -504,7 +629,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
504
629
|
if (!isNOU(closestLI) && endNode.textContent.length === range.endOffset &&
|
|
505
630
|
!range.collapsed && isNOU(endNode.nextElementSibling)) {
|
|
506
631
|
for (var i = 0; i < closestLI.childNodes.length; i++) {
|
|
507
|
-
if (closestLI.childNodes[i].nodeName ===
|
|
632
|
+
if (closestLI.childNodes[i].nodeName === '#text' && closestLI.childNodes[i].textContent.trim().length === 0) {
|
|
508
633
|
detach(closestLI.childNodes[i]);
|
|
509
634
|
i--;
|
|
510
635
|
}
|
|
@@ -602,9 +727,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
602
727
|
this.autoResize();
|
|
603
728
|
};
|
|
604
729
|
RichTextEditor.prototype.keyUp = function (e) {
|
|
605
|
-
if (this.editorMode ===
|
|
730
|
+
if (this.editorMode === 'HTML') {
|
|
606
731
|
var range = this.getRange();
|
|
607
|
-
if (Browser.userAgent.indexOf('Firefox')
|
|
732
|
+
if (Browser.userAgent.indexOf('Firefox') !== -1 && range.startContainer.nodeName === '#text' &&
|
|
608
733
|
range.startContainer.parentElement === this.inputElement && this.enterKey !== 'BR') {
|
|
609
734
|
var range_1 = this.getRange();
|
|
610
735
|
var tempElem = this.createElement(this.enterKey);
|
|
@@ -614,6 +739,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
614
739
|
}
|
|
615
740
|
}
|
|
616
741
|
this.notify(events.keyUp, { member: 'keyup', args: e });
|
|
742
|
+
if (e.keyCode == 39 || e.keyCode == 37) {
|
|
743
|
+
this.notify(events.tableModulekeyUp, { member: 'tableModulekeyUp', args: e });
|
|
744
|
+
}
|
|
617
745
|
if (e.code === 'KeyX' && e.which === 88 && e.keyCode === 88 && e.ctrlKey && (this.inputElement.innerHTML === '' ||
|
|
618
746
|
this.inputElement.innerHTML === '<br>')) {
|
|
619
747
|
this.inputElement.innerHTML = getEditValue(getDefaultValue(this), this);
|
|
@@ -697,7 +825,11 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
697
825
|
clientX: touch.clientX, clientY: touch.clientY }
|
|
698
826
|
});
|
|
699
827
|
if (this.inputElement && ((this.editorMode === 'HTML' && this.inputElement.textContent.length !== 0) ||
|
|
700
|
-
(this.editorMode === 'Markdown' && this.inputElement.value.length !== 0))
|
|
828
|
+
(this.editorMode === 'Markdown' && this.inputElement.value.length !== 0)) || (e.target && (e.target.nodeName === 'VIDEO'
|
|
829
|
+
|| e.target.querySelectorAll('.' + classes.CLS_VIDEOWRAP).length > 0) || (e.target && e.target.nodeName !== 'BR' &&
|
|
830
|
+
(e.target.classList.contains(classes.CLS_AUDIOWRAP) ||
|
|
831
|
+
e.target.classList.contains(classes.CLS_CLICKELEM) ||
|
|
832
|
+
e.target.classList.contains(classes.CLS_VID_CLICK_ELEM))))) {
|
|
701
833
|
this.notify(events.toolbarRefresh, { args: e });
|
|
702
834
|
}
|
|
703
835
|
this.triggerEditArea(e);
|
|
@@ -1050,6 +1182,9 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1050
1182
|
this.value = this.serializeValue(((this.enableHtmlEncode) ? this.encode(decode(val)) : val));
|
|
1051
1183
|
}
|
|
1052
1184
|
this.updatePanelValue();
|
|
1185
|
+
if (this.inputElement) {
|
|
1186
|
+
this.notify(events.tableclass, {});
|
|
1187
|
+
}
|
|
1053
1188
|
this.setPlaceHolder();
|
|
1054
1189
|
this.notify(events.xhtmlValidation, { module: 'XhtmlValidation', newProp: newProp, oldProp: oldProp });
|
|
1055
1190
|
if (this.enableXhtml) {
|
|
@@ -1058,6 +1193,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1058
1193
|
if (this.showCharCount) {
|
|
1059
1194
|
this.countModule.refresh();
|
|
1060
1195
|
}
|
|
1196
|
+
this.addAudioVideoWrapper();
|
|
1061
1197
|
break;
|
|
1062
1198
|
}
|
|
1063
1199
|
case 'valueTemplate':
|
|
@@ -1272,7 +1408,7 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1272
1408
|
});
|
|
1273
1409
|
}
|
|
1274
1410
|
this.placeHolderWrapper.innerHTML = this.placeholder;
|
|
1275
|
-
if (this.inputElement.textContent.length === 0 && !isNOU(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
|
|
1411
|
+
if (this.inputElement.textContent.length === 0 && this.inputElement.childNodes.length < 2 && !isNOU(this.inputElement.firstChild) && (this.inputElement.firstChild.nodeName === 'BR' ||
|
|
1276
1412
|
((this.inputElement.firstChild.nodeName === 'P' || this.inputElement.firstChild.nodeName === 'DIV') && !isNOU(this.inputElement.firstChild.firstChild) &&
|
|
1277
1413
|
this.inputElement.firstChild.firstChild.nodeName === 'BR'))) {
|
|
1278
1414
|
this.placeHolderWrapper.style.display = 'block';
|
|
@@ -1556,6 +1692,25 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1556
1692
|
parseFloat(eleStyle.marginLeft.split('px')[0]) + parseFloat(eleStyle.marginRight.split('px')[0]));
|
|
1557
1693
|
return isNOU(maxWidth) ? editEleMaxWidth : maxWidth;
|
|
1558
1694
|
};
|
|
1695
|
+
/**
|
|
1696
|
+
* Video max width calculation method
|
|
1697
|
+
*
|
|
1698
|
+
* @returns {void}
|
|
1699
|
+
* @hidden
|
|
1700
|
+
|
|
1701
|
+
*/
|
|
1702
|
+
RichTextEditor.prototype.getInsertVidMaxWidth = function () {
|
|
1703
|
+
var maxWidth = this.insertVideoSettings.maxWidth;
|
|
1704
|
+
// eslint-disable-next-line
|
|
1705
|
+
var vidPadding = 12;
|
|
1706
|
+
var vidResizeBorder = 2;
|
|
1707
|
+
var editEle = this.contentModule.getEditPanel();
|
|
1708
|
+
var eleStyle = window.getComputedStyle(editEle);
|
|
1709
|
+
var editEleMaxWidth = editEle.offsetWidth - (vidPadding + vidResizeBorder +
|
|
1710
|
+
parseFloat(eleStyle.paddingLeft.split('px')[0]) + parseFloat(eleStyle.paddingRight.split('px')[0]) +
|
|
1711
|
+
parseFloat(eleStyle.marginLeft.split('px')[0]) + parseFloat(eleStyle.marginRight.split('px')[0]));
|
|
1712
|
+
return isNOU(maxWidth) ? editEleMaxWidth : maxWidth;
|
|
1713
|
+
};
|
|
1559
1714
|
/**
|
|
1560
1715
|
* setContentHeight method
|
|
1561
1716
|
*
|
|
@@ -1684,6 +1839,12 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1684
1839
|
else if (type === DialogType.InsertImage) {
|
|
1685
1840
|
this.notify(events.showImageDialog, {});
|
|
1686
1841
|
}
|
|
1842
|
+
else if (type === DialogType.InsertAudio) {
|
|
1843
|
+
this.notify(events.showAudioDialog, {});
|
|
1844
|
+
}
|
|
1845
|
+
else if (type === DialogType.InsertVideo) {
|
|
1846
|
+
this.notify(events.showVideoDialog, {});
|
|
1847
|
+
}
|
|
1687
1848
|
else if (type === DialogType.InsertTable) {
|
|
1688
1849
|
this.notify(events.showTableDialog, {});
|
|
1689
1850
|
}
|
|
@@ -1702,6 +1863,12 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
1702
1863
|
else if (type === DialogType.InsertImage) {
|
|
1703
1864
|
this.notify(events.closeImageDialog, {});
|
|
1704
1865
|
}
|
|
1866
|
+
else if (type === DialogType.InsertAudio) {
|
|
1867
|
+
this.notify(events.closeAudioDialog, {});
|
|
1868
|
+
}
|
|
1869
|
+
else if (type === DialogType.InsertVideo) {
|
|
1870
|
+
this.notify(events.closeVideoDialog, {});
|
|
1871
|
+
}
|
|
1705
1872
|
else if (type === DialogType.InsertTable) {
|
|
1706
1873
|
this.notify(events.closeTableDialog, {});
|
|
1707
1874
|
}
|
|
@@ -2221,6 +2388,12 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2221
2388
|
__decorate([
|
|
2222
2389
|
Complex({}, ImageSettings)
|
|
2223
2390
|
], RichTextEditor.prototype, "insertImageSettings", void 0);
|
|
2391
|
+
__decorate([
|
|
2392
|
+
Complex({}, AudioSettings)
|
|
2393
|
+
], RichTextEditor.prototype, "insertAudioSettings", void 0);
|
|
2394
|
+
__decorate([
|
|
2395
|
+
Complex({}, VideoSettings)
|
|
2396
|
+
], RichTextEditor.prototype, "insertVideoSettings", void 0);
|
|
2224
2397
|
__decorate([
|
|
2225
2398
|
Complex({}, TableSettings)
|
|
2226
2399
|
], RichTextEditor.prototype, "tableSettings", void 0);
|
|
@@ -2386,6 +2559,27 @@ var RichTextEditor = /** @class */ (function (_super) {
|
|
|
2386
2559
|
__decorate([
|
|
2387
2560
|
Event()
|
|
2388
2561
|
], RichTextEditor.prototype, "afterImageDelete", void 0);
|
|
2562
|
+
__decorate([
|
|
2563
|
+
Event()
|
|
2564
|
+
], RichTextEditor.prototype, "fileSelected", void 0);
|
|
2565
|
+
__decorate([
|
|
2566
|
+
Event()
|
|
2567
|
+
], RichTextEditor.prototype, "beforeFileUpload", void 0);
|
|
2568
|
+
__decorate([
|
|
2569
|
+
Event()
|
|
2570
|
+
], RichTextEditor.prototype, "fileUploading", void 0);
|
|
2571
|
+
__decorate([
|
|
2572
|
+
Event()
|
|
2573
|
+
], RichTextEditor.prototype, "fileUploadSuccess", void 0);
|
|
2574
|
+
__decorate([
|
|
2575
|
+
Event()
|
|
2576
|
+
], RichTextEditor.prototype, "fileUploadFailed", void 0);
|
|
2577
|
+
__decorate([
|
|
2578
|
+
Event()
|
|
2579
|
+
], RichTextEditor.prototype, "fileRemoving", void 0);
|
|
2580
|
+
__decorate([
|
|
2581
|
+
Event()
|
|
2582
|
+
], RichTextEditor.prototype, "afterMediaDelete", void 0);
|
|
2389
2583
|
__decorate([
|
|
2390
2584
|
Event()
|
|
2391
2585
|
], RichTextEditor.prototype, "created", void 0);
|
|
@@ -37,6 +37,8 @@ var Formatter = /** @class */ (function () {
|
|
|
37
37
|
&& args.item.command !== 'Links'
|
|
38
38
|
&& args.item.command !== 'Images'
|
|
39
39
|
&& args.item.command !== 'Files'
|
|
40
|
+
&& args.item.command !== 'Audios'
|
|
41
|
+
&& args.item.command !== 'Videos'
|
|
40
42
|
&& range
|
|
41
43
|
&& !(self.contentModule.getEditPanel().contains(this.getAncestorNode(range.commonAncestorContainer))
|
|
42
44
|
|| self.contentModule.getEditPanel() === range.commonAncestorContainer
|
|
@@ -48,7 +50,7 @@ var Formatter = /** @class */ (function () {
|
|
|
48
50
|
if (args.item.command === 'Links') {
|
|
49
51
|
currentInsertContentLength = value.text.length === 0 ? value.url.length : value.text.length;
|
|
50
52
|
}
|
|
51
|
-
if (args.item.command === 'Images' || args.item.command === 'Table' || args.item.command === 'Files') {
|
|
53
|
+
if (args.item.command === 'Images' || args.item.command === 'Videos' || args.item.command === 'Table' || args.item.command === 'Files') {
|
|
52
54
|
currentInsertContentLength = 1;
|
|
53
55
|
}
|
|
54
56
|
var currentLength = self.getText().trim().length;
|
|
@@ -170,7 +172,7 @@ var Formatter = /** @class */ (function () {
|
|
|
170
172
|
}
|
|
171
173
|
self.trigger(CONSTANT.actionComplete, events, function (callbackArgs) {
|
|
172
174
|
self.setPlaceHolder();
|
|
173
|
-
if ((callbackArgs.requestType === 'Images' || callbackArgs.requestType === 'Links') && self.editorMode === 'HTML') {
|
|
175
|
+
if ((callbackArgs.requestType === 'Images' || callbackArgs.requestType === 'Links' || callbackArgs.requestType === 'Audios' || callbackArgs.requestType === 'Videos') && self.editorMode === 'HTML') {
|
|
174
176
|
var args = callbackArgs;
|
|
175
177
|
if (callbackArgs.requestType === 'Links' && callbackArgs.event &&
|
|
176
178
|
callbackArgs.event.type === 'keydown' &&
|
|
@@ -182,6 +184,9 @@ var Formatter = /** @class */ (function () {
|
|
|
182
184
|
elements: args.elements
|
|
183
185
|
});
|
|
184
186
|
}
|
|
187
|
+
if (callbackArgs.requestType === 'VideosPlayPause') {
|
|
188
|
+
self.notify('editAreaClick', { args: event });
|
|
189
|
+
}
|
|
185
190
|
self.autoResize();
|
|
186
191
|
});
|
|
187
192
|
};
|
|
@@ -34,7 +34,19 @@ export var defaultLocale = {
|
|
|
34
34
|
'editLink': 'Edit Link',
|
|
35
35
|
'removeLink': 'Remove Link',
|
|
36
36
|
'image': 'Insert Image',
|
|
37
|
+
'audio': 'Insert Audio',
|
|
38
|
+
'video': 'Insert Video',
|
|
37
39
|
'replace': 'Replace',
|
|
40
|
+
'numberFormatList': 'Number Format List',
|
|
41
|
+
'bulletFormatList': 'Bullet Format List',
|
|
42
|
+
'audioReplace': 'Replace',
|
|
43
|
+
'videoReplace': 'Replace',
|
|
44
|
+
'videoAlign': 'Align',
|
|
45
|
+
'videoDimension': 'Dimension',
|
|
46
|
+
'audioRemove': 'Remove',
|
|
47
|
+
'videoRemove': 'Remove',
|
|
48
|
+
'audioLayoutOption': 'Layout option',
|
|
49
|
+
'videoLayoutOption': 'Layout option',
|
|
38
50
|
'align': 'Align',
|
|
39
51
|
'caption': 'Image Caption',
|
|
40
52
|
'remove': 'Remove',
|
|
@@ -64,18 +76,34 @@ export var defaultLocale = {
|
|
|
64
76
|
'dialogCancel': 'Cancel',
|
|
65
77
|
'dialogUpdate': 'Update',
|
|
66
78
|
'imageHeader': 'Insert Image',
|
|
79
|
+
'audioHeader': 'Insert Audio',
|
|
80
|
+
'videoHeader': 'Insert Video',
|
|
67
81
|
'imageLinkHeader': 'You can also provide a link from the web',
|
|
82
|
+
'audioLinkHeader': 'You can also provide a link from the web',
|
|
83
|
+
'videoLinkHeader': 'Web URL',
|
|
84
|
+
'embedVideoLinkHeader': 'Media Embed URL',
|
|
68
85
|
'mdimageLink': 'Please provide a URL for your image',
|
|
69
86
|
'imageUploadMessage': 'Drop image here or browse to upload',
|
|
87
|
+
'audioUploadMessage': 'Drop an audio file or browse to upload',
|
|
88
|
+
'videoUploadMessage': 'Drop a video file or browse to upload',
|
|
70
89
|
'imageDeviceUploadMessage': 'Click here to upload',
|
|
90
|
+
'audioDeviceUploadMessage': 'Click here to upload',
|
|
91
|
+
'videoDeviceUploadMessage': 'Click here to upload',
|
|
71
92
|
'imageAlternateText': 'Alternate Text',
|
|
72
93
|
'alternateHeader': 'Alternative Text',
|
|
73
94
|
'browse': 'Browse',
|
|
74
95
|
'imageUrl': 'http://example.com/image.png',
|
|
96
|
+
'audioUrl': 'http://example.com/audio.mp3',
|
|
97
|
+
'videoUrl': 'http://example.com/video.mp3',
|
|
98
|
+
'webUrl': 'Web URL',
|
|
99
|
+
'embedUrl': 'Embed Code',
|
|
75
100
|
'imageCaption': 'Caption',
|
|
76
101
|
'imageSizeHeader': 'Image Size',
|
|
102
|
+
'videoSizeHeader': 'Video Size',
|
|
77
103
|
'imageHeight': 'Height',
|
|
78
104
|
'imageWidth': 'Width',
|
|
105
|
+
'videoHeight': 'Height',
|
|
106
|
+
'videoWidth': 'Width',
|
|
79
107
|
'textPlaceholder': 'Enter Text',
|
|
80
108
|
'inserttablebtn': 'Insert Table',
|
|
81
109
|
'tabledialogHeader': 'Insert Table',
|
|
@@ -106,12 +134,18 @@ export var defaultLocale = {
|
|
|
106
134
|
'TableColText': 'Col',
|
|
107
135
|
'imageInsertLinkHeader': 'Insert Link',
|
|
108
136
|
'editImageHeader': 'Edit Image',
|
|
137
|
+
'editAudioHeader': 'Edit Audio',
|
|
138
|
+
'editVideoHeader': 'Edit Video',
|
|
109
139
|
"alignmentsDropDownLeft": 'Align Left',
|
|
110
140
|
"alignmentsDropDownCenter": 'Align Center',
|
|
111
141
|
"alignmentsDropDownRight": 'Align Right',
|
|
112
142
|
"alignmentsDropDownJustify": 'Align Justify',
|
|
113
143
|
"imageDisplayDropDownInline": 'Inline',
|
|
114
144
|
"imageDisplayDropDownBreak": 'Break',
|
|
145
|
+
"audioLayoutOptionDropDownInline": 'Inline',
|
|
146
|
+
"audioLayoutOptionDropDownBreak": 'Break',
|
|
147
|
+
"videoLayoutOptionDropDownInline": 'Inline',
|
|
148
|
+
"videoLayoutOptionDropDownBreak": 'Break',
|
|
115
149
|
"tableInsertRowDropDownBefore": 'Insert row before',
|
|
116
150
|
"tableInsertRowDropDownAfter": 'Insert row after',
|
|
117
151
|
"tableInsertRowDropDownDelete": 'Delete row',
|
|
@@ -181,6 +215,8 @@ export var toolsLocale = {
|
|
|
181
215
|
'orderedlist': 'orderedList',
|
|
182
216
|
'indent': 'indent',
|
|
183
217
|
'outdent': 'outdent',
|
|
218
|
+
'numberformatlist': 'numberFormatList',
|
|
219
|
+
'bulletformatlist': 'bulletFormatList',
|
|
184
220
|
'undo': 'undo',
|
|
185
221
|
'redo': 'redo',
|
|
186
222
|
'superscript': 'superscript',
|
|
@@ -193,7 +229,17 @@ export var toolsLocale = {
|
|
|
193
229
|
'editimagelink': 'editLink',
|
|
194
230
|
'removeimagelink': 'removeLink',
|
|
195
231
|
'image': 'image',
|
|
232
|
+
'audio': 'audio',
|
|
233
|
+
'video': 'video',
|
|
196
234
|
'replace': 'replace',
|
|
235
|
+
'audioreplace': 'audioReplace',
|
|
236
|
+
'videoreplace': 'videoReplace',
|
|
237
|
+
'videoalign': 'videoAlign',
|
|
238
|
+
'videodimension': 'videoDimension',
|
|
239
|
+
'audioremove': 'audioRemove',
|
|
240
|
+
'videoremove': 'videoRemove',
|
|
241
|
+
'audiolayoutoption': 'audioLayoutOption',
|
|
242
|
+
'videolayoutoption': 'videoLayoutOption',
|
|
197
243
|
'align': 'align',
|
|
198
244
|
'caption': 'caption',
|
|
199
245
|
'remove': 'remove',
|
|
@@ -8,7 +8,10 @@ export declare let tools: {
|
|
|
8
8
|
};
|
|
9
9
|
export declare let alignmentItems: IDropDownItemModel[];
|
|
10
10
|
export declare let imageAlignItems: IDropDownItemModel[];
|
|
11
|
+
export declare let videoAlignItems: IDropDownItemModel[];
|
|
11
12
|
export declare let imageDisplayItems: IDropDownItemModel[];
|
|
13
|
+
export declare let audioLayoutOptionItems: IDropDownItemModel[];
|
|
14
|
+
export declare let videoLayoutOptionItems: IDropDownItemModel[];
|
|
12
15
|
export declare let tableCellItems: IDropDownItemModel[];
|
|
13
16
|
export declare let tableRowsItems: IDropDownItemModel[];
|
|
14
17
|
export declare let tableColumnsItems: IDropDownItemModel[];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Export items model
|
|
4
4
|
*/
|
|
5
|
-
export var templateItems = ['alignments', 'formats', 'fontname', 'fontsize', 'fontcolor', 'backgroundcolor', 'align', 'display', 'tablerows', 'tablecolumns', 'tablecell', 'tablecellhorizontalalign', 'tablecellverticalalign', 'styles', 'numberformatlist', 'bulletformatlist'];
|
|
5
|
+
export var templateItems = ['alignments', 'formats', 'fontname', 'fontsize', 'fontcolor', 'backgroundcolor', 'align', 'display', 'audiolayoutoption', 'videolayoutoption', 'videoalign', 'tablerows', 'tablecolumns', 'tablecell', 'tablecellhorizontalalign', 'tablecellverticalalign', 'styles', 'numberformatlist', 'bulletformatlist'];
|
|
6
6
|
export var tools = {
|
|
7
7
|
'alignments': {
|
|
8
8
|
'id': 'Alignments',
|
|
@@ -237,6 +237,20 @@ export var tools = {
|
|
|
237
237
|
'command': 'Images',
|
|
238
238
|
'subCommand': 'Image'
|
|
239
239
|
},
|
|
240
|
+
'audio': {
|
|
241
|
+
'id': 'Audio',
|
|
242
|
+
'icon': 'e-audio',
|
|
243
|
+
'tooltip': 'Insert Audio',
|
|
244
|
+
'command': 'Audios',
|
|
245
|
+
'subCommand': 'Audio'
|
|
246
|
+
},
|
|
247
|
+
'video': {
|
|
248
|
+
'id': 'Video',
|
|
249
|
+
'icon': 'e-video',
|
|
250
|
+
'tooltip': 'Insert Video',
|
|
251
|
+
'command': 'Videos',
|
|
252
|
+
'subCommand': 'Video'
|
|
253
|
+
},
|
|
240
254
|
'filemanager': {
|
|
241
255
|
'id': 'FileManager',
|
|
242
256
|
'icon': 'e-rte-file-manager',
|
|
@@ -265,6 +279,62 @@ export var tools = {
|
|
|
265
279
|
'command': 'Images',
|
|
266
280
|
'subCommand': 'Replace'
|
|
267
281
|
},
|
|
282
|
+
'audioreplace': {
|
|
283
|
+
'id': 'AudioReplace',
|
|
284
|
+
'icon': 'e-audio-replace',
|
|
285
|
+
'tooltip': 'Audio Replace',
|
|
286
|
+
'command': 'Audios',
|
|
287
|
+
'subCommand': 'AudioReplace'
|
|
288
|
+
},
|
|
289
|
+
'audioremove': {
|
|
290
|
+
'id': 'AudioRemove',
|
|
291
|
+
'icon': 'e-audio-remove',
|
|
292
|
+
'tooltip': 'Audio Remove',
|
|
293
|
+
'command': 'Audios',
|
|
294
|
+
'subCommand': 'AudioRemove'
|
|
295
|
+
},
|
|
296
|
+
'audiolayoutoption': {
|
|
297
|
+
'id': 'AudioLayoutOption',
|
|
298
|
+
'icon': 'e-audio-display',
|
|
299
|
+
'tooltip': 'Audio LayoutOption',
|
|
300
|
+
'command': 'Audios',
|
|
301
|
+
'subCommand': 'AudioLayoutOption'
|
|
302
|
+
},
|
|
303
|
+
'videoreplace': {
|
|
304
|
+
'id': 'VideoReplace',
|
|
305
|
+
'icon': 'e-video-replace',
|
|
306
|
+
'tooltip': 'Video Replace',
|
|
307
|
+
'command': 'Videos',
|
|
308
|
+
'subCommand': 'VideoReplace'
|
|
309
|
+
},
|
|
310
|
+
'videoalign': {
|
|
311
|
+
'id': 'VideoAlign',
|
|
312
|
+
'icon': 'e-video-align',
|
|
313
|
+
'tooltip': 'Video Align',
|
|
314
|
+
'command': 'Videos',
|
|
315
|
+
'subCommand': 'VideoAlign'
|
|
316
|
+
},
|
|
317
|
+
'videoremove': {
|
|
318
|
+
'id': 'VideoRemove',
|
|
319
|
+
'icon': 'e-video-remove',
|
|
320
|
+
'tooltip': 'Video Remove',
|
|
321
|
+
'command': 'Videos',
|
|
322
|
+
'subCommand': 'VideoRemove'
|
|
323
|
+
},
|
|
324
|
+
'videolayoutoption': {
|
|
325
|
+
'id': 'VideoLayoutOption',
|
|
326
|
+
'icon': 'e-video-display',
|
|
327
|
+
'tooltip': 'Video LayoutOption',
|
|
328
|
+
'command': 'Videos',
|
|
329
|
+
'subCommand': 'VideoLayoutOption'
|
|
330
|
+
},
|
|
331
|
+
'videodimension': {
|
|
332
|
+
'id': 'VideoDimension',
|
|
333
|
+
'icon': 'e-video-dimension',
|
|
334
|
+
'tooltip': 'Video Dimension',
|
|
335
|
+
'command': 'Videos',
|
|
336
|
+
'subCommand': 'VideoDimension'
|
|
337
|
+
},
|
|
268
338
|
'align': {
|
|
269
339
|
'id': 'Align',
|
|
270
340
|
'icon': 'e-align',
|
|
@@ -500,14 +570,35 @@ export var imageAlignItems = [
|
|
|
500
570
|
{ iconCss: 'e-icons e-justify-center', command: 'Images', subCommand: 'JustifyCenter' },
|
|
501
571
|
{ iconCss: 'e-icons e-justify-right', command: 'Images', subCommand: 'JustifyRight' },
|
|
502
572
|
];
|
|
573
|
+
export var videoAlignItems = [
|
|
574
|
+
{ iconCss: 'e-icons e-justify-left', command: 'Videos', subCommand: 'JustifyLeft' },
|
|
575
|
+
{ iconCss: 'e-icons e-justify-center', command: 'Videos', subCommand: 'JustifyCenter' },
|
|
576
|
+
{ iconCss: 'e-icons e-justify-right', command: 'Videos', subCommand: 'JustifyRight' },
|
|
577
|
+
];
|
|
503
578
|
var displayLocale = [
|
|
504
|
-
{ locale: '
|
|
505
|
-
{ locale: '
|
|
579
|
+
{ locale: 'imageLayoutOptionDropDownInline', value: 'Inline' },
|
|
580
|
+
{ locale: 'imageLayoutOptionDropDownBreak', value: 'Break' }
|
|
581
|
+
];
|
|
582
|
+
var audioLayoutOptionLocale = [
|
|
583
|
+
{ locale: 'audioLayoutOptionDropDownInline', value: 'Inline' },
|
|
584
|
+
{ locale: 'audioLayoutOptionDropDownBreak', value: 'Break' }
|
|
585
|
+
];
|
|
586
|
+
var videoLayoutOptionLocale = [
|
|
587
|
+
{ locale: 'videoLayoutOptionDropDownInline', value: 'Inline' },
|
|
588
|
+
{ locale: 'videoLayoutOptionDropDownBreak', value: 'Break' }
|
|
506
589
|
];
|
|
507
590
|
export var imageDisplayItems = [
|
|
508
591
|
{ text: 'Inline', cssClass: 'e-inline', command: 'Images', subCommand: 'Inline' },
|
|
509
592
|
{ text: 'Break', cssClass: 'e-break', command: 'Images', subCommand: 'Break' },
|
|
510
593
|
];
|
|
594
|
+
export var audioLayoutOptionItems = [
|
|
595
|
+
{ text: 'Inline', cssClass: 'e-audio-inline', command: 'Audios', subCommand: 'Inline' },
|
|
596
|
+
{ text: 'Break', cssClass: 'e-audio-break', command: 'Audios', subCommand: 'Break' },
|
|
597
|
+
];
|
|
598
|
+
export var videoLayoutOptionItems = [
|
|
599
|
+
{ text: 'Inline', cssClass: 'e-video-inline', command: 'Videos', subCommand: 'Inline' },
|
|
600
|
+
{ text: 'Break', cssClass: 'e-video-break', command: 'Videos', subCommand: 'Break' },
|
|
601
|
+
];
|
|
511
602
|
export var tableCellItems = [
|
|
512
603
|
{ iconCss: 'e-icons e-cell-merge', text: 'Merge cells', command: 'Table', subCommand: 'Merge' },
|
|
513
604
|
{ iconCss: 'e-icons e-cell-horizontal-split', text: 'Horizontal split', command: 'Table', subCommand: 'HorizontalSplit' },
|
|
@@ -630,6 +721,12 @@ export function updateDropDownLocale(self) {
|
|
|
630
721
|
imageDisplayItems.forEach(function (item, i) {
|
|
631
722
|
imageDisplayItems[i].text = getLocale(self, displayLocale, imageDisplayItems[i]);
|
|
632
723
|
});
|
|
724
|
+
audioLayoutOptionItems.forEach(function (item, i) {
|
|
725
|
+
audioLayoutOptionItems[i].text = getLocale(self, audioLayoutOptionLocale, audioLayoutOptionItems[i]);
|
|
726
|
+
});
|
|
727
|
+
videoLayoutOptionItems.forEach(function (item, i) {
|
|
728
|
+
videoLayoutOptionItems[i].text = getLocale(self, videoLayoutOptionLocale, videoLayoutOptionItems[i]);
|
|
729
|
+
});
|
|
633
730
|
tableRowsItems.forEach(function (item, i) {
|
|
634
731
|
tableRowsItems[i].text = getLocale(self, tableRowLocale, tableRowsItems[i]);
|
|
635
732
|
});
|