matcha-components 20.238.0 → 20.239.0
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.
|
@@ -137,8 +137,8 @@
|
|
|
137
137
|
--se-doc-info-inner-line-indent-h6: 2em;
|
|
138
138
|
--se-edit-font-size: 16px;
|
|
139
139
|
--se-edit-line-height: 1.5em;
|
|
140
|
-
--se-main-font-family:
|
|
141
|
-
--se-content-font-family:
|
|
140
|
+
--se-main-font-family: Sans serif;
|
|
141
|
+
--se-content-font-family: Sans serif;
|
|
142
142
|
--se-main-font-size: 14px;
|
|
143
143
|
--se-markdown-font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
144
144
|
--se-codeview-font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
@@ -14566,7 +14566,7 @@ const DEFAULT_OPTIONS = {
|
|
|
14566
14566
|
showLink: true,
|
|
14567
14567
|
showImage: true,
|
|
14568
14568
|
showVideo: true,
|
|
14569
|
-
showMarkdown:
|
|
14569
|
+
showMarkdown: true,
|
|
14570
14570
|
showFullScreen: true,
|
|
14571
14571
|
showCodeView: true,
|
|
14572
14572
|
addFont: [],
|
|
@@ -14584,6 +14584,7 @@ function buildSunEditorConfig(options = {}) {
|
|
|
14584
14584
|
videoWidth: opts.videoX,
|
|
14585
14585
|
videoHeight: opts.videoY,
|
|
14586
14586
|
font: opts.addFont?.length ? opts.addFont.map(f => f.value) : undefined,
|
|
14587
|
+
defaultStyle: 'font-family: Arial, sans-serif; font-size: 16px;',
|
|
14587
14588
|
};
|
|
14588
14589
|
}
|
|
14589
14590
|
function _buildButtonList(opts) {
|
|
@@ -14608,6 +14609,7 @@ function _buildButtonList(opts) {
|
|
|
14608
14609
|
const viewBtns = [
|
|
14609
14610
|
...(opts.showFullScreen ? ['fullScreen'] : []),
|
|
14610
14611
|
...(opts.showCodeView ? ['codeView'] : []),
|
|
14612
|
+
...(opts.showMarkdown ? ['markdownView'] : []),
|
|
14611
14613
|
];
|
|
14612
14614
|
if (viewBtns.length)
|
|
14613
14615
|
desktop.push('|', viewBtns);
|
|
@@ -14628,7 +14630,7 @@ function _buildButtonList(opts) {
|
|
|
14628
14630
|
'|',
|
|
14629
14631
|
['table', 'link', 'image', 'video'],
|
|
14630
14632
|
'|',
|
|
14631
|
-
['fullScreen', 'codeView'],
|
|
14633
|
+
['fullScreen', 'codeView', 'markdownView'],
|
|
14632
14634
|
]],
|
|
14633
14635
|
['%768', [
|
|
14634
14636
|
['undo', 'redo'],
|
|
@@ -14641,7 +14643,7 @@ function _buildButtonList(opts) {
|
|
|
14641
14643
|
'|',
|
|
14642
14644
|
[':Insert-default.more_plus', 'table', 'link', 'image', 'video'],
|
|
14643
14645
|
'|',
|
|
14644
|
-
['fullScreen', 'codeView'],
|
|
14646
|
+
['fullScreen', 'codeView', 'markdownView'],
|
|
14645
14647
|
]],
|
|
14646
14648
|
['%576', [
|
|
14647
14649
|
['undo', 'redo'],
|
|
@@ -14651,7 +14653,7 @@ function _buildButtonList(opts) {
|
|
|
14651
14653
|
['outdent', 'indent', 'align', 'list'],
|
|
14652
14654
|
'|',
|
|
14653
14655
|
[':Insert-default.more_plus', 'table', 'link', 'image', 'video'],
|
|
14654
|
-
['-right', 'fullScreen', 'codeView'],
|
|
14656
|
+
['-right', 'fullScreen', 'codeView', 'markdownView'],
|
|
14655
14657
|
]],
|
|
14656
14658
|
];
|
|
14657
14659
|
}
|
|
@@ -14781,7 +14783,7 @@ class MatchaTextEditorComponent {
|
|
|
14781
14783
|
const v = value || '';
|
|
14782
14784
|
this._isSettingValue = true;
|
|
14783
14785
|
if (this._editor) {
|
|
14784
|
-
this._editor.
|
|
14786
|
+
this._editor.html.set(v);
|
|
14785
14787
|
}
|
|
14786
14788
|
else {
|
|
14787
14789
|
this._pendingValue = v;
|
|
@@ -14798,7 +14800,7 @@ class MatchaTextEditorComponent {
|
|
|
14798
14800
|
this._disabled = isDisabled;
|
|
14799
14801
|
if (!this._editor)
|
|
14800
14802
|
return;
|
|
14801
|
-
isDisabled ? this._editor.
|
|
14803
|
+
isDisabled ? this._editor.toolbar.disable() : this._editor.toolbar.enable();
|
|
14802
14804
|
}
|
|
14803
14805
|
// Private
|
|
14804
14806
|
_injectScript(id, url) {
|
|
@@ -14853,7 +14855,7 @@ class MatchaTextEditorComponent {
|
|
|
14853
14855
|
await this._injectScript('suneditor-lang-ptbr', `${CDN_BASE}/langs/pt-br.js`);
|
|
14854
14856
|
}
|
|
14855
14857
|
_reloadEditor() {
|
|
14856
|
-
const content = this._editor?.
|
|
14858
|
+
const content = this._editor?.html.get() ?? '';
|
|
14857
14859
|
this._editor?.destroy();
|
|
14858
14860
|
this._editor = null;
|
|
14859
14861
|
this._pendingValue = content;
|
|
@@ -14893,7 +14895,7 @@ class MatchaTextEditorComponent {
|
|
|
14893
14895
|
},
|
|
14894
14896
|
});
|
|
14895
14897
|
if (this._disabled) {
|
|
14896
|
-
this._editor.
|
|
14898
|
+
this._editor.toolbar.disable();
|
|
14897
14899
|
}
|
|
14898
14900
|
const sunEditorEl = this._el.nativeElement.querySelector('.sun-editor');
|
|
14899
14901
|
if (sunEditorEl)
|
|
@@ -14901,7 +14903,7 @@ class MatchaTextEditorComponent {
|
|
|
14901
14903
|
setTimeout(() => {
|
|
14902
14904
|
if (this._pendingValue) {
|
|
14903
14905
|
this._isSettingValue = true;
|
|
14904
|
-
this._editor.
|
|
14906
|
+
this._editor.html.set(this._pendingValue);
|
|
14905
14907
|
this._pendingValue = '';
|
|
14906
14908
|
setTimeout(() => { this._isSettingValue = false; }, 0);
|
|
14907
14909
|
}
|