Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { HtmlRender, HtmlType } from './preview';

type Plugin = { comp: any; config: any };

interface EditorProps extends EditorConfig {
export interface EditorProps extends EditorConfig {
id?: string;
defaultValue?: string;
value?: string;
Expand All @@ -41,7 +41,7 @@ interface EditorProps extends EditorConfig {
onScroll?: (e: React.UIEvent<HTMLTextAreaElement | HTMLDivElement>, type: 'md' | 'html') => void;
}

interface EditorState {
export interface EditorState {
text: string;
html: HtmlType;
fullScreen: boolean;
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Editor from './editor';
import Editor, { EditorProps, EditorState } from './editor';
import AutoResize from './plugins/autoResize';
import BlockCodeBlock from './plugins/block/code-block';
import BlockCodeInline from './plugins/block/code-inline';
Expand Down Expand Up @@ -48,6 +48,8 @@ Editor.use(FullScreen);
export { DropList };
export { PluginComponent };
export type { PluginProps };
// 导出编辑器类型
export type { EditorProps, EditorState };
// 导出实用工具
export { default as getDecorated } from './utils/decorate';
// 导出内置插件
Expand Down