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.
@@ -9835,7 +9835,7 @@ class ZtexteditorComponent extends InputFieldBase {
9835
9835
  CustomReplacements: [],
9836
9836
  };
9837
9837
  this.pluginsCallback = (defaultPlugins) => {
9838
- if (this.data?.EnterKeyBehavior === 'paragraph') {
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.data?.EnterKeyBehavior === 'paragraph') {
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) {