@hailin-zheng/editor-core 2.2.15 → 2.2.16

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/index-cjs.js CHANGED
@@ -8799,13 +8799,15 @@ class DataElementGroupElement extends InlineGroupInputElement {
8799
8799
  val += '';
8800
8800
  }
8801
8801
  if (val) {
8802
- const items = val.split('<br/>');
8802
+ const items = val.split('\n');
8803
8803
  if (items.length) {
8804
8804
  items.forEach((item, index) => {
8805
- const valueText = new TextGroupElement();
8806
- this.props.valueTextProps.clone(valueText.props);
8807
- valueText.text = item + '';
8808
- this.addChild(valueText, this.length - 1);
8805
+ if (item) {
8806
+ const valueText = new TextGroupElement();
8807
+ this.props.valueTextProps.clone(valueText.props);
8808
+ valueText.text = item + '';
8809
+ this.addChild(valueText, this.length - 1);
8810
+ }
8809
8811
  if (index < items.length - 1) {
8810
8812
  const brElement = new BreakElement();
8811
8813
  this.addChild(brElement, this.length - 1);
@@ -9201,13 +9203,15 @@ class DataElementText extends DataElementInlineGroup {
9201
9203
  val += '';
9202
9204
  }
9203
9205
  if (val) {
9204
- const items = val.split('<br/>');
9206
+ const items = val.split('\n');
9205
9207
  if (items.length) {
9206
9208
  items.forEach((item, index) => {
9207
- const valueText = new TextGroupElement();
9208
- this.props.valueTextProps.clone(valueText.props);
9209
- valueText.text = item + '';
9210
- this.addChild(valueText, this.length - 1);
9209
+ if (item) {
9210
+ const valueText = new TextGroupElement();
9211
+ this.props.valueTextProps.clone(valueText.props);
9212
+ valueText.text = item + '';
9213
+ this.addChild(valueText, this.length - 1);
9214
+ }
9211
9215
  if (index < items.length - 1) {
9212
9216
  const brElement = new BreakElement();
9213
9217
  this.addChild(brElement, this.length - 1);
@@ -22314,7 +22318,7 @@ class DocEditor {
22314
22318
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
22315
22319
  }
22316
22320
  version() {
22317
- return "2.2.15";
22321
+ return "2.2.16";
22318
22322
  }
22319
22323
  switchPageHeaderEditor() {
22320
22324
  this.docCtx.document.switchPageHeaderEditor(this.selectionState, null);