kc-plate-editor 0.5.4 → 0.5.5
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/dist/components/editor/plate-editor.d.ts +8 -2
- package/dist/{index-D-kymQAz.js → index-0mdn5jU9.js} +93 -93
- package/dist/{index-BX9WxJZL.mjs → index-BKLgjVhn.mjs} +1 -1
- package/dist/{index-ClCxNd_m.js → index-BqOOVSN6.js} +1 -1
- package/dist/{index-C4RdEaLJ.mjs → index-mh-7Yu-k.mjs} +5950 -5905
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -88,6 +88,8 @@ export interface PlateEditorProps {
|
|
|
88
88
|
autoSaveInterval?: number;
|
|
89
89
|
/** 自动保存回调 */
|
|
90
90
|
onAutoSave?: (content: Value) => void;
|
|
91
|
+
/** 保存回调(用于快捷键保存 Ctrl+S / Cmd+S) */
|
|
92
|
+
onSave?: (content: Value) => void;
|
|
91
93
|
}
|
|
92
94
|
/**
|
|
93
95
|
* PlateEditor 组件引用接口
|
|
@@ -150,8 +152,12 @@ export interface PlateEditorRef {
|
|
|
150
152
|
exportAsMarkdown: (filename?: string) => Promise<void>;
|
|
151
153
|
/** 导出为 PDF 文件 */
|
|
152
154
|
exportAsPdf: (filename?: string) => Promise<void>;
|
|
153
|
-
/**
|
|
154
|
-
exportAsImage: (filename
|
|
155
|
+
/** 导出为图片 */
|
|
156
|
+
exportAsImage: (filename: string) => Promise<void>;
|
|
157
|
+
/** 清理本地存储的临时内容 */
|
|
158
|
+
clearLocalStorage: () => void;
|
|
159
|
+
/** 手动保存到本地存储 */
|
|
160
|
+
saveToLocalStorage: () => void;
|
|
155
161
|
/** 查找文本 */
|
|
156
162
|
find: (searchText: string, options?: FindOptions) => MatchPosition[];
|
|
157
163
|
/** 替换文本 */
|