Circle V2 API Docs
    Preparing search index...

    Function useEditor

    • This hook allows you to create an editor instance.

      Parameters

      • options: Partial<EditorOptions> & {
            immediatelyRender?: boolean;
            shouldRerenderOnTransaction?: boolean;
        } & { immediatelyRender: false }

        The editor options

        • OptionalimmediatelyRender?: boolean

          Whether to render the editor on the first render. If client-side rendering, set this to true. If server-side rendering, set this to false.

          true
          
        • OptionalshouldRerenderOnTransaction?: boolean

          Whether to re-render the editor on each transaction. This is legacy behavior that will be removed in future versions.

          false
          
        • immediatelyRender: false
      • Optionaldeps: DependencyList

        The dependencies to watch for changes

      Returns Editor | null

      The editor instance

      const editor = useEditor({ extensions: [...] })
      
    • This hook allows you to create an editor instance.

      Parameters

      • options: UseEditorOptions

        The editor options

      • Optionaldeps: DependencyList

        The dependencies to watch for changes

      Returns Editor

      The editor instance

      const editor = useEditor({ extensions: [...] })