@hailin-zheng/editor-core 2.2.15 → 2.2.17

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.
@@ -485,6 +485,31 @@ export declare class DocEditor {
485
485
  private renderSuggestions;
486
486
  insertSuggestion(suggestion: ISuggestionData): void;
487
487
  parser(code: string, returnProcess?: boolean): string;
488
+ /**
489
+ * 返回当前光标处是否允许截断段落生成新的段落
490
+ * @returns
491
+ */
492
+ allowSplitParagraph(): boolean;
493
+ /**
494
+ * 设置元素属性(attribute)
495
+ * @param ele
496
+ * @param attr
497
+ * @param value
498
+ */
499
+ setEleAttribute(ele: Element, attr: string, value: any): void;
500
+ /**
501
+ * 获取元素属性(attribute)
502
+ * @param ele
503
+ * @param attr
504
+ * @returns
505
+ */
506
+ getEleAttribute(ele: Element, attr: string): any;
507
+ /**
508
+ * 删除元素属性(attribute)
509
+ * @param ele
510
+ * @param attr
511
+ */
512
+ removeEleAttribute(ele: Element, attr: string): void;
488
513
  }
489
514
  export interface IReaderManager {
490
515
  }
@@ -275,6 +275,13 @@ export declare class DocumentChange {
275
275
  * @param text
276
276
  */
277
277
  private pastePlainText;
278
+ /**
279
+ * 当前光标位置是否允许分割生成两个段落
280
+ */
281
+ allowSplitParagraph(target?: {
282
+ startControl: LeafElement;
283
+ startOffset: number;
284
+ }): boolean;
278
285
  /**
279
286
  * 向当前光标追加文本
280
287
  * @param appendStr
@@ -16,7 +16,7 @@ export declare class ElementSerialize {
16
16
  * @param ss
17
17
  * @param viewOptions
18
18
  */
19
- static getSelectedStruct(ss: SelectionState, viewOptions: ViewOptions): Element | null;
19
+ static getSelectedStruct(ss: SelectionState, viewOptions: ViewOptions): Array<Element> | null;
20
20
  /**
21
21
  * 选中的文本
22
22
  * @param ss
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "hailin-zheng",
5
5
  "private": false,
6
6
  "license": "ISC",
7
- "version": "2.2.15",
7
+ "version": "2.2.17",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "moment": "^2.29.3",