The set of blocks a document can use.
default/0 is the built-in blocks plus the ones configured by your app:
config :elementorex_cms,
# your blocks, added to the built-in ones (same type = replaces it)
blocks: [MyAppWeb.Blocks.Pricing, MyAppWeb.Blocks.Whatsapp],
# built-in types to leave out
exclude_blocks: ["video", "mockup"]A registry can also be built for one editor or page with new/2, e.g. to offer
fewer blocks in a modal than in a landing page:
registry = ElementorexCms.Registry.new(only: ~w(heading text button image alert))
Summary
Functions
Whether a node of child_type may go inside a node of parent_type, per the
:children option of the parent and the :parents option of the child.
Built-in block modules.
Palette categories of the built-in blocks, in display order.
Whether the type is a container block.
The built-in blocks plus the configured ones (see the module docs).
The module of a block type, or nil.
Block modules in registration order.
Builds a registry.
Blocks shown in the palette grouped by category: [{category, [module]}],
built-in categories first, then the custom ones in order of appearance.
Types
Functions
Whether a node of child_type may go inside a node of parent_type, per the
:children option of the parent and the :parents option of the child.
@spec builtin() :: [module()]
Built-in block modules.
@spec categories() :: [atom()]
Palette categories of the built-in blocks, in display order.
Whether the type is a container block.
@spec default() :: t()
The built-in blocks plus the configured ones (see the module docs).
The module of a block type, or nil.
Block modules in registration order.
Builds a registry.
:blocks- block modules (default: the built-in ones plus the configured):only- keep only these types (the root is always kept):exclude- leave out these types
Blocks shown in the palette grouped by category: [{category, [module]}],
built-in categories first, then the custom ones in order of appearance.