mmhglobal-dynamicform 2.44.3 → 2.44.4
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/README.md +5 -0
- package/esm2020/lib/ztexteditor/ztexteditor.component.mjs +6 -3
- package/fesm2015/mmhglobal-dynamicform.mjs +6 -4
- package/fesm2015/mmhglobal-dynamicform.mjs.map +1 -1
- package/fesm2020/mmhglobal-dynamicform.mjs +5 -2
- package/fesm2020/mmhglobal-dynamicform.mjs.map +1 -1
- package/lib/ztexteditor/ztexteditor.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -9835,7 +9835,7 @@ class ZtexteditorComponent extends InputFieldBase {
|
|
|
9835
9835
|
CustomReplacements: [],
|
|
9836
9836
|
};
|
|
9837
9837
|
this.pluginsCallback = (defaultPlugins) => {
|
|
9838
|
-
if (this.
|
|
9838
|
+
if (this.isParagraphEnterBehavior()) {
|
|
9839
9839
|
return defaultPlugins;
|
|
9840
9840
|
}
|
|
9841
9841
|
return [this.enterAsLineBreakPlugin(), ...defaultPlugins];
|
|
@@ -9923,7 +9923,7 @@ class ZtexteditorComponent extends InputFieldBase {
|
|
|
9923
9923
|
}
|
|
9924
9924
|
plainTextToEditorHtml(value) {
|
|
9925
9925
|
const lines = value.split('\n');
|
|
9926
|
-
if (this.
|
|
9926
|
+
if (this.isParagraphEnterBehavior()) {
|
|
9927
9927
|
return lines
|
|
9928
9928
|
.map(line => line.trim() ? `<p>${this.escapeHtml(line)}</p>` : '<p><br></p>')
|
|
9929
9929
|
.join('');
|
|
@@ -10316,6 +10316,9 @@ class ZtexteditorComponent extends InputFieldBase {
|
|
|
10316
10316
|
linesToHardBreakParagraphHtml(lines) {
|
|
10317
10317
|
return `<p>${lines.map(line => this.escapeHtml(line)).join('<br>')}</p>`;
|
|
10318
10318
|
}
|
|
10319
|
+
isParagraphEnterBehavior() {
|
|
10320
|
+
return this.data?.EnterKeyBehavior !== 'lineBreak';
|
|
10321
|
+
}
|
|
10319
10322
|
replaceRangeWithHtml(from, to, html) {
|
|
10320
10323
|
const view = this.editor?.view;
|
|
10321
10324
|
if (!view) {
|