Sign up (with export icon)

core/editor/utils/rootacceptsblocks

Api-module iconmodule

Functions

  • Chevron-right icon

    rootAcceptsBlocks( editor, rootName ) → boolean
    internal

    Returns whether the model root with the given name accepts $block children according to the editor's schema.

    Call this once the plugin initialization phase is finished — typically during UI init or right after creating a new editable — so the schema reflects any plugin-registered root types or additional content rules.

    Parameters

    editor : Editor
    rootName : string

    Returns

    boolean