Getting Started
Extensions
API
Community

GitHub Download

version 1.4.7

SmartBlock

Customize

Acutually, You can build your own Extension. Here is the Extension interface!

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, so You may also want to know about ProseMirror to

Document

Usage, introduction of other functions, component introduction etc.
are described in detail in the document.

Get Started

View on GitHub

SmartBlock was developed by @appleplecom and is open source (MIT license) on GitHub.
Please send us feedback, requests, bug reports and pull requests!

If you like it, please press Star ;)

GitHub page

If you like our project, we glad to have star! :)

GitHub
SmartBlock

A modern block styled editor built with React.
SmartBlock is provided with MIT license. Made by @appleple ♥ OSS