@hailin-zheng/editor-core 2.0.5 → 2.0.7

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.js CHANGED
@@ -4482,7 +4482,14 @@ class TableRowElement extends BlockContainerElement {
4482
4482
  setChildrenModifyFlag(ModifyFlag$1.Modify, tb.getChild(j));
4483
4483
  }
4484
4484
  }
4485
- cell.modifyFlag = ModifyFlag$1.Modify;
4485
+ else if (cell.props.vMerge === 'restart') {
4486
+ const endRowIndex = TableUtil.getVMergeEndIndex(tb, currRowIndex, i);
4487
+ for (let j = currRowIndex; j <= endRowIndex; j++) {
4488
+ setChildrenModifyFlag(ModifyFlag$1.Modify, tb.getChild(j));
4489
+ }
4490
+ break;
4491
+ }
4492
+ //cell.modifyFlag = ModifyFlag.Modify;
4486
4493
  }
4487
4494
  }
4488
4495
  createRenderObject() {
@@ -12005,7 +12012,7 @@ class PictureFactory extends ElementFactory {
12005
12012
  picProps.width = props.width;
12006
12013
  picProps.height = props.height;
12007
12014
  picProps.src = props.src;
12008
- picProps.border = props.border || 'all';
12015
+ picProps.border = props.border;
12009
12016
  picProps.title = props.title;
12010
12017
  pic.props = picProps;
12011
12018
  return pic;
@@ -19223,13 +19230,18 @@ class DocumentChange {
19223
19230
  else if (pasteElement instanceof BlockContainerElement) {
19224
19231
  const children = ElementUtil.getChildrenElements(pasteElement);
19225
19232
  //复制的内容全部为段落,执行黏贴操作
19226
- if (children.every(item => item instanceof ParagraphElement)) {
19227
- const targetParagraph = this.splitCurrentParagraph();
19228
- children.forEach((item, i) => {
19229
- targetParagraph.parent.addChild(item, targetParagraph.getIndex());
19230
- });
19231
- this.selectionState.resetRange(children[children.length - 1], -1);
19232
- }
19233
+ // if (children.every(item => item instanceof ParagraphElement)) {
19234
+ // const targetParagraph = this.splitCurrentParagraph();
19235
+ // children.forEach((item, i) => {
19236
+ // targetParagraph.parent.addChild(item, targetParagraph.getIndex());
19237
+ // });
19238
+ // this.selectionState.resetRange(children[children.length - 1], -1);
19239
+ // }
19240
+ const targetParagraph = this.splitCurrentParagraph();
19241
+ children.forEach((item, i) => {
19242
+ targetParagraph.parent.addChild(item, targetParagraph.getIndex());
19243
+ });
19244
+ this.selectionState.resetRange(children[children.length - 1], -1);
19233
19245
  }
19234
19246
  }
19235
19247
  insertSoftBr() {
@@ -19547,6 +19559,9 @@ function createPrintTemplate({ width, height, orient }) {
19547
19559
  box-sizing: border-box;
19548
19560
  -moz-box-sizing: border-box;
19549
19561
  }
19562
+ body *{
19563
+ white-space: pre;
19564
+ }
19550
19565
  @page {
19551
19566
  size: ${orient};
19552
19567
  margin: 0;