Back to reference

GrammarlyEditorPluginProps

Props for <GrammarlyEditorPlugin>.

Permits HTML attributes like className, style, etc.

interface GrammarlyEditorPluginProps extends GrammarlyEditorPluginCallbacks, Omit<HTMLAttributes<HTMLElement>, "children"> {
  children: ReactNode | ((props: {
        setEditor: (editor: HTMLElement | null) => void;
        setViewport: (viewport: HTMLElement | null) => void;
    }) => ReactNode);
  clientId?: ClientId;
  config?: Partial<EditorConfig>;
}

Properties

childrenType: ReactNode | ((props: { setEditor: (editor: HTMLElement | null) => void; setViewport: (viewport: HTMLElement | null) => void; }) => ReactNode)

Render prop that allows setting underlying editor for advanced uses.

clientIdoptionalType: ClientId

The client ID used to authenticate with Grammarly.

configoptionalType: Partial<EditorConfig>

Optional configuration to customize the Grammarly integration.

Last Updated: 1/30/2023, 10:49:17 PM