Compare commits
2 Commits
6a9e377f0a
...
3cbbbd411a
| Author | SHA1 | Date |
|---|---|---|
|
|
3cbbbd411a | |
|
|
b934bbffda |
|
|
@ -1,18 +1,18 @@
|
||||||
import type { Editor as WangEditorInstance } from "@wangeditor/editor";
|
import type { IDomEditor } from "@wangeditor/editor";
|
||||||
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
||||||
|
|
||||||
export interface EditorProps {
|
export interface EditorProps {
|
||||||
/** 编辑器内容值 */
|
/** 编辑器内容值 */
|
||||||
value?: string;
|
value: string;
|
||||||
/** 内容改变回调 */
|
/** 内容改变回调 */
|
||||||
onChange?: (html: string) => void;
|
onChange: (html: string) => void;
|
||||||
/** 是否禁用 */
|
/** 是否禁用 */
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EditorRef {
|
export interface EditorRef {
|
||||||
/** 获取编辑器实例 */
|
/** 获取编辑器实例 */
|
||||||
getEditorInstance: () => WangEditorInstance | null;
|
getEditorInstance: () => IDomEditor | null;
|
||||||
/** 获取HTML内容 */
|
/** 获取HTML内容 */
|
||||||
getHtml: () => string | undefined;
|
getHtml: () => string | undefined;
|
||||||
/** 设置HTML内容 */
|
/** 设置HTML内容 */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue