Docs Category: Hooks & Filters

  • ea.styleCopied

    Description After style has been copied from a block Arguments attributes – object – styling attributes clientId – string – selected block id Located src/plugins/styles-plugin.js Example

  • ea.getAllowedBlocks

    Description Sets a list of blocks allowed to apply BlockStyles. Arguments allowedBlocks – array – list of allowed blocks (string) Located src/constants.js Example

  • ea.stylePanel.title

    Description Sets style panel title Arguments title – string – current title isBlockOverride – boolean – if current style panel is being overridden defaultTitle – string – default title for style panel stylePanelState – object – current state of panel Located src/plugins/styles-plugin.js Example

  • ea.getAttributes

    Description Allows to add extra data into the extraProps of a block on save. Arguments extraProps – object – object of extra props Located src/register/add-filter.js Example

  • ea.getAttributes.editor

    Description Used to set wrapper props to the block list. Arguments props – object – props sent Located src/register/add-filter.js Example

  • ea.saveStyleContents

    Description Returns all settings for style panels Arguments allSettings – array – list of allowed settings objects Located src/register/add-format.js src/register/add-filter.js Example

  • ea.getSettingsPanel

    Description Get array of style panels Arguments allPanels – array – Array of panel objects Located src/register/add-panels Example

  • ea.getStylesToAttributesObject

    Description Used when creating an attributes object, to load into the styles panel, from HTML styles and classes on an element. Arguments attributes – object – attributes object (similar to block attributes) styles – string – the style string from the element classes – string – the class string from the element Located src/lib.js Example

  • ea.afterReset

    Description After reset block styles for a block Arguments attributes – array – block attributes clientId – string – block client id Located src/plugins/styles-plugin.js Example