Support

Account

Home Forums Gutenberg Convert Gutenberg paragraph block to ACF-registered textarea block

Solving

Convert Gutenberg paragraph block to ACF-registered textarea block

  • I may be asking for the moon on a stick here, but:

    I’ve got an ACF block which is just a single textarea field with wpautop formatting (the block output is slightly modified to give it a wrapper with conditional classes based on the current page). Client is pasting in many paragraphs of text from documents and emails, so would like to be able to use Transform to on selected Paragraph blocks to switch them to this custom ACF paragraph block.

    Is this possible with acf_register_block? I noticed there’s a transforms argument when registering a block type in the core: https://wordpress.org/gutenberg/handbook/designers-developers/developers/block-api/block-registration/#transforms-optional

    • rootid

    • September 26, 2019 at 8:13 am

    I’m also very interested in this functionality…

    • sschat

    • December 11, 2019 at 7:55 pm

    Yes, interested in this as well.
    Need to “transform” some default blocks to ACF blocks.

    Going to hunt in the big internet now for more details and clues about this.

  • Maybe not the ideal solution (you’re looking for), but you can probably hide/disable the current Paragraph block and create a new one from ACF.

    This however would require you to migrate current content to the new ACF blocks, so far from ideal.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.