Compare commits

...

2 Commits

Author SHA1 Message Date
LiuJiaNan 3cbbbd411a 优化Editor组件类型 2025-12-06 15:48:29 +08:00
LiuJiaNan b934bbffda 优化Editor组件类型 2025-12-06 15:45:33 +08:00
1 changed files with 4 additions and 4 deletions

View File

@ -1,18 +1,18 @@
import type { Editor as WangEditorInstance } from "@wangeditor/editor";
import type { IDomEditor } from "@wangeditor/editor";
import type { ForwardRefExoticComponent, RefAttributes } from "react";
export interface EditorProps {
/** 编辑器内容值 */
value?: string;
value: string;
/** 内容改变回调 */
onChange?: (html: string) => void;
onChange: (html: string) => void;
/** 是否禁用 */
disabled?: boolean;
}
export interface EditorRef {
/** 获取编辑器实例 */
getEditorInstance: () => WangEditorInstance | null;
getEditorInstance: () => IDomEditor | null;
/** 获取HTML内容 */
getHtml: () => string | undefined;
/** 设置HTML内容 */