Wagtail client-side components
    Preparing search index...
    default: {
        DocumentModalWorkflowSource: typeof DocumentModalWorkflowSource;
        DraftUtils: {
            addHorizontalRuleRemovingSelection(
                editorState: EditorState,
            ): EditorState;
            addLineBreak(editorState: EditorState): EditorState;
            applyMarkdownStyle(
                editorState: EditorState,
                range: { end: number; pattern: string; start: number; type: string },
                char: string,
            ): EditorState;
            getCommandPalettePrompt(
                editorState: EditorState,
            ): null | { block: ContentBlock; position: number; text: string };
            getEntitySelection(
                editorState: EditorState,
                entityKey?: string,
            ): SelectionState;
            getEntityTypeStrategy(
                entityType: string,
            ): (
                block: ContentBlock,
                callback: (start: number, end: number) => void,
                contentState: ContentState,
            ) => void;
            getSelectedBlock(editorState: EditorState): ContentBlock;
            getSelectionEntity(editorState: EditorState): undefined | string;
            handleDeleteAtomic(editorState: EditorState): false | EditorState;
            handleHardNewline(editorState: EditorState): false | EditorState;
            handleNewLine(
                editorState: EditorState,
                event: KeyboardEvent,
            ): false | EditorState;
            insertNewUnstyledBlock(editorState: EditorState): EditorState;
            removeBlock(editorState: EditorState, key: string): EditorState;
            removeBlockEntity(
                editorState: EditorState,
                entityKey: string,
                blockKey: string,
            ): EditorState;
            removeCommandPalettePrompt(editorState: EditorState): EditorState;
            resetBlockWithType(
                editorState: EditorState,
                newType?: string,
                newText?: string,
                newData?: { [key: string]: unknown },
            ): EditorState;
            updateBlockEntity(
                editorState: EditorState,
                block: ContentBlock,
                data: { [key: string]: unknown },
            ): EditorState;
        };
        EmbedModalWorkflowSource: typeof EmbedModalWorkflowSource;
        ImageModalWorkflowSource: typeof ImageModalWorkflowSource;
        initEditor: (
            selector: string,
            originalOptions: any,
            currentScript: Element,
        ) => (undefined | ((newOptions: any) => void))[];
        LinkModalWorkflowSource: typeof LinkModalWorkflowSource;
        ModalWorkflowSource: typeof ModalWorkflowSource;
        registerPlugin: (type: any, optionName?: string) => any;
        splitState: (
            editorState: EditorState,
        ) => {
            shouldMoveCommentFn: (comment: Comment) => boolean;
            stateAfter: EditorState;
            stateBefore: EditorState;
        };
        Tooltip: {
            propTypes: {
                children: Validator<NonNullable<ReactNodeLike>>;
                direction: Validator<string>;
                target: Validator<
                    NonNullable<
                        InferProps<
                            {
                                height: Validator<number>;
                                left: Validator<number>;
                                top: Validator<number>;
                                width: Validator<number>;
                            },
                        >,
                    >,
                >;
            };
            (
                __namedParameters: { children: any; direction: any; target: any },
            ): Element;
        };
        TooltipEntity: typeof default;
    }

    Type declaration

    • DocumentModalWorkflowSource: typeof DocumentModalWorkflowSource
    • DraftUtils: {
          addHorizontalRuleRemovingSelection(
              editorState: EditorState,
          ): EditorState;
          addLineBreak(editorState: EditorState): EditorState;
          applyMarkdownStyle(
              editorState: EditorState,
              range: { end: number; pattern: string; start: number; type: string },
              char: string,
          ): EditorState;
          getCommandPalettePrompt(
              editorState: EditorState,
          ): null | { block: ContentBlock; position: number; text: string };
          getEntitySelection(
              editorState: EditorState,
              entityKey?: string,
          ): SelectionState;
          getEntityTypeStrategy(
              entityType: string,
          ): (
              block: ContentBlock,
              callback: (start: number, end: number) => void,
              contentState: ContentState,
          ) => void;
          getSelectedBlock(editorState: EditorState): ContentBlock;
          getSelectionEntity(editorState: EditorState): undefined | string;
          handleDeleteAtomic(editorState: EditorState): false | EditorState;
          handleHardNewline(editorState: EditorState): false | EditorState;
          handleNewLine(
              editorState: EditorState,
              event: KeyboardEvent,
          ): false | EditorState;
          insertNewUnstyledBlock(editorState: EditorState): EditorState;
          removeBlock(editorState: EditorState, key: string): EditorState;
          removeBlockEntity(
              editorState: EditorState,
              entityKey: string,
              blockKey: string,
          ): EditorState;
          removeCommandPalettePrompt(editorState: EditorState): EditorState;
          resetBlockWithType(
              editorState: EditorState,
              newType?: string,
              newText?: string,
              newData?: { [key: string]: unknown },
          ): EditorState;
          updateBlockEntity(
              editorState: EditorState,
              block: ContentBlock,
              data: { [key: string]: unknown },
          ): EditorState;
      }
      • addHorizontalRuleRemovingSelection: function
        • Inserts a horizontal rule in the place of the current selection. Returns updated EditorState. Inspired by DraftUtils.addLineBreakRemovingSelection.

          Parameters

          • editorState: EditorState

          Returns EditorState

      • addLineBreak: function
      • applyMarkdownStyle: function
        • Applies an inline style on a given range, based on a Markdown shortcut, removing the Markdown markers. Supports adding styles on existing styles, and entities.

          Parameters

          • editorState: EditorState
          • range: { end: number; pattern: string; start: number; type: string }
          • char: string

          Returns EditorState

      • getCommandPalettePrompt: function
        • Parameters

          • editorState: EditorState

          Returns null | { block: ContentBlock; position: number; text: string }

      • getEntitySelection: function
        • Creates a selection on a given entity in the currently selected block. Returns the current selection if no entity key is provided, or if the entity could not be found.

          Parameters

          • editorState: EditorState
          • OptionalentityKey: string

          Returns SelectionState

      • getEntityTypeStrategy: function
        • Get an entity decorator strategy based on the given entity type. This strategy will find all entities of the given type.

          Parameters

          • entityType: string

          Returns (
              block: ContentBlock,
              callback: (start: number, end: number) => void,
              contentState: ContentState,
          ) => void

      • getSelectedBlock: function
        • Returns the first selected block.

          Parameters

          • editorState: EditorState

          Returns ContentBlock

      • getSelectionEntity: function
      • handleDeleteAtomic: function
        • Handles pressing delete within an atomic block. This can happen when selection is placed on an image. Ideally this should be handled by the built-in RichUtils, but it's not. See https://github.com/wagtail/wagtail/issues/4370.

          Parameters

          • editorState: EditorState

          Returns false | EditorState

      • handleHardNewline: function
      • handleNewLine: function
      • insertNewUnstyledBlock: function
      • removeBlock: function
        • Removes the block at the given key.

          Parameters

          • editorState: EditorState
          • key: string

          Returns EditorState

      • removeBlockEntity: function
        • Removes a block-level entity, turning the block into an empty paragraph, and placing the selection on it.

          Parameters

          • editorState: EditorState
          • entityKey: string
          • blockKey: string

          Returns EditorState

      • removeCommandPalettePrompt: function
        • Parameters

          • editorState: EditorState

          Returns EditorState

      • resetBlockWithType: function
        • Changes a block type to be newType, setting its new text. Also removes the required characters from the characterList, and resets block data.

          Parameters

          • editorState: EditorState
          • OptionalnewType: string
          • OptionalnewText: string
          • OptionalnewData: { [key: string]: unknown }

          Returns EditorState

      • updateBlockEntity: function
        • Updates a given atomic block's entity, merging new data with the old one.

          Parameters

          • editorState: EditorState
          • block: ContentBlock
          • data: { [key: string]: unknown }

          Returns EditorState

    • EmbedModalWorkflowSource: typeof EmbedModalWorkflowSource
    • ImageModalWorkflowSource: typeof ImageModalWorkflowSource
    • initEditor: (
          selector: string,
          originalOptions: any,
          currentScript: Element,
      ) => (undefined | ((newOptions: any) => void))[]
    • LinkModalWorkflowSource: typeof LinkModalWorkflowSource
    • ModalWorkflowSource: typeof ModalWorkflowSource
    • registerPlugin: (type: any, optionName?: string) => any
    • splitState: (
          editorState: EditorState,
      ) => {
          shouldMoveCommentFn: (comment: Comment) => boolean;
          stateAfter: EditorState;
          stateBefore: EditorState;
      }
    • Tooltip: {
          propTypes: {
              children: Validator<NonNullable<ReactNodeLike>>;
              direction: Validator<string>;
              target: Validator<
                  NonNullable<
                      InferProps<
                          {
                              height: Validator<number>;
                              left: Validator<number>;
                              top: Validator<number>;
                              width: Validator<number>;
                          },
                      >,
                  >,
              >;
          };
          (
              __namedParameters: { children: any; direction: any; target: any },
          ): Element;
      }
    • TooltipEntity: typeof default