Skip to content

Commit

Permalink
doc: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
uidev1116 committed Jul 8, 2024
1 parent 892f40c commit 27d43c1
Show file tree
Hide file tree
Showing 4 changed files with 28,731 additions and 593 deletions.
2 changes: 1 addition & 1 deletion gatsby/.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.13.1
16.18.0
105 changes: 44 additions & 61 deletions gatsby/content/blog/customize.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,53 @@ Acutually, You can build your own Extension.
Here is the Extension interface!

```ts
export abstract class Extension {

constructor(props: ExtensionProps) {}

name: string

customName?: string

schema?: ExtensionSchema

customSchema?: ExtensionSchema

schemaDependencies?: {
[key: string]: ExtensionSchema;
}

customProps?: {
[key: string]: any;
}

tagName?: string

className?: string

customMenu?({ state: EditorState, dispatch: Dispatch }): JSX.Element

customInlineMenu?({ state: EditorState, dispatch: Dispatch }): JSX.Element

customLayout?(props: CustomLayoutProps, dom: HTMLElement): JSX.Element

customButton?({ state: EditorState, dispatch: Dispatch }): JSX.Element

customIcon?: JSX.Element | string

icon?: JSX.Element | string

plugins?: Plugin<any, any>[]

showMenu: boolean

hideMenuOnFocus?: boolean

hideBlockMenuOnFocus?: boolean

hideInlineMenuOnFocus?: boolean

group?: string

// "edit" | "mark" | "block"
view?(node: Node, view: EditorView, getPos: () => number): NodeView

active?(state: EditorState): boolean

enable?(state: EditorState): boolean

onClick?(state: EditorState, dispatch: Dispatch, view?: EditorView): void

keys?(schema: Schema): { [key: string]: any }

btnColor?: 'black' | 'white'
export declare abstract class Extension {
constructor(props: ExtensionProps);
name: string;
customName?: string;
schema?: ExtensionSchema;
customSchema?: ExtensionSchema;
schemaDependencies?: {
[key: string]: ExtensionSchema;
};
customProps?: {
[key: string]: any;
};
tagName?: string;
className?: string;
customMenu?({ state, dispatch }: {
state: EditorState;
dispatch: Dispatch;
}): JSX.Element | null;
customInlineMenu?({ state, dispatch }: {
state: EditorState;
dispatch: Dispatch;
}): JSX.Element | null;
customLayout?(props: CustomLayoutProps, dom: HTMLElement): JSX.Element | null;
customButton?({ state, dispatch }: {
state: EditorState;
dispatch: Dispatch;
}): JSX.Element | null;
customIcon?: JSX.Element | string | null;
icon?: JSX.Element | string | null;
plugins?: Plugin<any>[];
showMenu: boolean;
hideMenuOnFocus?: boolean;
hideBlockMenuOnFocus?: boolean;
hideInlineMenuOnFocus?: boolean;
group?: string;
view?(node: Node, view: EditorView, getPos: () => number): NodeView;
active?(state: EditorState): boolean;
enable?(state: EditorState): boolean;
onClick?(state: EditorState, dispatch: Dispatch, view?: EditorView): void;
keys?(schema: Schema): {
[key: string]: any;
};
btnColor?: 'black' | 'white';
}
```

### ProseMirror


SmartBlock deeply depends on [ProseMirror](https://prosemirror.net/), so You may also want to know about [ProseMirror](https://prosemirror.net/) to
SmartBlock deeply depends on [ProseMirror](https://prosemirror.net/), so You may also want to know about [ProseMirror](https://prosemirror.net/) to
Loading

0 comments on commit 27d43c1

Please sign in to comment.