tnx-shared 5.3.349 → 5.3.351
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/bundles/tnx-shared.umd.js +21 -19
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/form-schema.d.ts +1 -0
- package/classes/form-schema.d.ts.map +1 -1
- package/components/tn-tinymce/tn-tinymce.component.d.ts.map +1 -1
- package/esm2015/classes/form-schema.js +1 -1
- package/esm2015/components/tn-tinymce/tn-tinymce.component.js +22 -19
- package/fesm2015/tnx-shared.js +21 -18
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -54386,10 +54386,10 @@
|
|
|
54386
54386
|
this.equationFormModel.data = data;
|
|
54387
54387
|
};
|
|
54388
54388
|
TnTinymceComponent.prototype.getTinyMceConfigByMode = function (mode) {
|
|
54389
|
-
var _this = this;
|
|
54390
54389
|
var $this = this;
|
|
54391
54390
|
tinymce.PluginManager.add('addNews', function (editor) {
|
|
54392
54391
|
var openDialog = function () {
|
|
54392
|
+
$this.editor = editor;
|
|
54393
54393
|
$this.header = 'Thêm/Chọn tin bài';
|
|
54394
54394
|
$this.isAddNews = true;
|
|
54395
54395
|
$this.isAddFile = false;
|
|
@@ -54405,6 +54405,7 @@
|
|
|
54405
54405
|
});
|
|
54406
54406
|
tinymce.PluginManager.add('template', function (editor) {
|
|
54407
54407
|
var openDialog = function () {
|
|
54408
|
+
$this.editor = editor;
|
|
54408
54409
|
$this.header = 'Thêm/Chọn template';
|
|
54409
54410
|
$this.showTemplate = true;
|
|
54410
54411
|
$this.popupSize = { width: 1200, height: 700 };
|
|
@@ -54419,6 +54420,7 @@
|
|
|
54419
54420
|
});
|
|
54420
54421
|
tinymce.PluginManager.add('editFileNew', function (editor) {
|
|
54421
54422
|
var openDialog = function () {
|
|
54423
|
+
$this.editor = editor;
|
|
54422
54424
|
$this.header = 'Thêm/Chỉnh sửa file cá nhân';
|
|
54423
54425
|
$this.isAddNews = false;
|
|
54424
54426
|
$this.isAddFile = true;
|
|
@@ -54433,13 +54435,13 @@
|
|
|
54433
54435
|
});
|
|
54434
54436
|
});
|
|
54435
54437
|
var callbackFunc = function (editor) {
|
|
54436
|
-
|
|
54437
|
-
if (
|
|
54438
|
+
$this.editor = editor;
|
|
54439
|
+
if ($this.disabled) {
|
|
54438
54440
|
editor.setMode('readonly');
|
|
54439
54441
|
}
|
|
54440
54442
|
var edBody = jQuery(editor.iframeElement).contents().find('body');
|
|
54441
54443
|
var editorHolder = editor.iframeElement.parentElement;
|
|
54442
|
-
if (
|
|
54444
|
+
if (!$this._deviceDetectorService.isDesktop()) {
|
|
54443
54445
|
edBody.addClass('mobile');
|
|
54444
54446
|
}
|
|
54445
54447
|
edBody.on('blur', function (e) {
|
|
@@ -54450,7 +54452,7 @@
|
|
|
54450
54452
|
var begin = new Date();
|
|
54451
54453
|
var types = e.originalEvent.clipboardData.types;
|
|
54452
54454
|
if (((types instanceof DOMStringList) && types.contains('text/html')) || (types.indexOf && (types.indexOf('text/html') !== -1) || types.indexOf('Files') !== -1)) {
|
|
54453
|
-
|
|
54455
|
+
$this._notifierService.showSuccess('Đang tiến hành xử lý nội dung, vui lòng chờ trong giây lát!');
|
|
54454
54456
|
e.originalEvent.stopPropagation();
|
|
54455
54457
|
e.originalEvent.preventDefault();
|
|
54456
54458
|
var types_1 = e.originalEvent.clipboardData.types;
|
|
@@ -54464,13 +54466,13 @@
|
|
|
54464
54466
|
}
|
|
54465
54467
|
}
|
|
54466
54468
|
setTimeout(function () {
|
|
54467
|
-
|
|
54469
|
+
$this.handlePaste(types_1, pastedData_1, pastedRtfData_1, files_1).then(function (content) {
|
|
54468
54470
|
var end = new Date();
|
|
54469
54471
|
console.log('Time to run handlePaste is ' + (end.getTime() - begin.getTime()) + 'ms');
|
|
54470
54472
|
if (content) {
|
|
54471
54473
|
// content = content.replace(/<!\[if[\s\S]*?>/gm, '').replace(/<!\[endif[\s\S]*?>/gm, '');
|
|
54472
|
-
content =
|
|
54473
|
-
content =
|
|
54474
|
+
content = $this.normalizeHTML(content, '<![if !supportLists]>', '<![endif]>');
|
|
54475
|
+
content = $this.normalizeHTML(content, '<![if !msEquation]>', '<![endif]>');
|
|
54474
54476
|
editor.execCommand('mceInsertContent', false, content);
|
|
54475
54477
|
}
|
|
54476
54478
|
});
|
|
@@ -54481,36 +54483,36 @@
|
|
|
54481
54483
|
if (e.ctrlKey || e.metaKey) {
|
|
54482
54484
|
switch (String.fromCharCode(e.which).toLowerCase()) {
|
|
54483
54485
|
case 's':
|
|
54484
|
-
|
|
54486
|
+
$this.onKeyDown(e, ComCtxConstants.ROOT.KEY_DOWN_CTRL_S);
|
|
54485
54487
|
e.preventDefault();
|
|
54486
54488
|
break;
|
|
54487
54489
|
}
|
|
54488
54490
|
}
|
|
54489
54491
|
else if (e.which == 27) {
|
|
54490
|
-
|
|
54492
|
+
$this.onKeyDown(e, ComCtxConstants.ROOT.KEY_DOWN_ESC);
|
|
54491
54493
|
e.preventDefault();
|
|
54492
54494
|
}
|
|
54493
54495
|
}).on('dblclick', function (e) {
|
|
54494
54496
|
if (e.target.nodeName.toLowerCase() == 'img' && e.target.classList.contains('latex')) {
|
|
54495
|
-
|
|
54497
|
+
$this.openDialog({ content: e.target.getAttribute('alt'), style: e.target.getAttribute('style'), height: e.target.getAttribute('height') });
|
|
54496
54498
|
}
|
|
54497
54499
|
}).on('keyup', function (e) {
|
|
54498
54500
|
var content = editor.getContent();
|
|
54499
|
-
|
|
54500
|
-
|
|
54501
|
+
$this.onChange(content);
|
|
54502
|
+
$this.onKeyUp.emit(content);
|
|
54501
54503
|
});
|
|
54502
54504
|
editor.on('blur', function (e) {
|
|
54503
|
-
|
|
54505
|
+
$this.handleBlur();
|
|
54504
54506
|
}).on('change', function (e) {
|
|
54505
54507
|
var content = editor.getContent();
|
|
54506
|
-
|
|
54507
|
-
|
|
54508
|
+
$this.onChange(content);
|
|
54509
|
+
$this.onChanged.emit(content);
|
|
54508
54510
|
});
|
|
54509
|
-
editor.setContent(
|
|
54511
|
+
editor.setContent($this.model);
|
|
54510
54512
|
};
|
|
54511
54513
|
var config = {
|
|
54512
|
-
selector: '#' + this.id,
|
|
54513
|
-
height: this.height,
|
|
54514
|
+
selector: '#' + $this.id,
|
|
54515
|
+
height: $this.height,
|
|
54514
54516
|
content_css: [
|
|
54515
54517
|
'/assets/vendor/tinymce/custom.css'
|
|
54516
54518
|
],
|