Back to reference

GrammarlyEditorPluginProps

Props for <GrammarlyEditorPlugin>

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

Properties

childrenReactNode | ((props: { setEditor: (editor: HTMLElement | null) => void; setViewport: (viewport: HTMLElement | null) => void; }) => ReactNode)
Render prop that allows setting underlying editor for advanced uses.

clientId optionalClientId
The client ID used to authenticate with Grammarly

config optionalPartial<EditorConfig>
Optional configuration to customize the Grammarly integration.

Last Updated: 9/17/2021, 11:38:18 PM