@agile_jy/word-editor 0.0.5 → 0.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.
@@ -50,9 +50,42 @@ export default class Editor {
50
50
  register: Register;
51
51
  destroy: () => void;
52
52
  use: UsePlugin;
53
+ private extensionParams;
53
54
  showFormInputConfig(el?: IElement | null): void;
54
55
  showFormCheckboxConfig(el?: IElement | null): void;
55
56
  showFormRadioConfig(el?: IElement | null): void;
57
+ /**
58
+ * 设置外部扩展参数
59
+ * @param key 参数键名
60
+ * @param value 参数值
61
+ */
62
+ setExtensionParam(key: string, value: any): void;
63
+ /**
64
+ * 批量设置外部扩展参数
65
+ * @param params 参数对象
66
+ */
67
+ setExtensionParams(params: Record<string, any>): void;
68
+ /**
69
+ * 获取外部扩展参数
70
+ * @param key 参数键名
71
+ * @returns 参数值
72
+ */
73
+ getExtensionParam(key: string): any;
74
+ /**
75
+ * 获取所有外部扩展参数
76
+ * @returns 所有扩展参数对象
77
+ */
78
+ getAllExtensionParams(): Record<string, any>;
79
+ /**
80
+ * 删除外部扩展参数
81
+ * @param key 参数键名
82
+ * @returns 是否删除成功
83
+ */
84
+ deleteExtensionParam(key: string): boolean;
85
+ /**
86
+ * 清空所有外部扩展参数
87
+ */
88
+ clearExtensionParams(): void;
56
89
  constructor(container: HTMLDivElement, data: IEditorData | IElement[], options?: IEditorOption);
57
90
  }
58
91
  export { splitText, createDomFromElementList, getElementListByHTML, getTextFromElementList };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@agile_jy/word-editor",
3
3
  "author": "JIANGYONG",
4
4
  "license": "MIT",
5
- "version": "0.0.5",
5
+ "version": "0.0.7",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",