I had a breakthrough shortly after posting the original question (isn’t that always the way?).
I reread this answer and realised what I needed to do to get the output rendered correctly.
- I created the
const
as described in the other answer.
const htmlToElem = ( html ) => wp.element.RawHTML( { children: html } );
- I tried adding the anonymous function to the
content
attribute but that just broke my JS and nothing would load. - Instead I directly referenced the
const
and passed it thesettings.description
object. This loaded everything as expected.
content: htmlToElem(settings.description),
Related Posts:
- Custom action button in Gutenberg editor (post_submitbox_misc_actions – equivalent)
- Using Primary Color in Plugin Block
- Create Element From Dynamic HTML String [closed]
- Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”
- What’s the Right Way to get and save remote data for a Gutenberg block?
- WordPress: After Gutenberg plugin migration to block.json the localization/ translations with PolyGlot in JavaScript does not work anymore
- Looking for callback function after Gutenberg is rendered?
- How to Parse an Array of Elements in Gutenberg Block
- Is there a better way to implement responsive images than what WordPress uses by default?
- Gutenberg registerFormatType with Multiple Classes
- Gutenberg: useDispatch is not a function – @wordpress/data included
- Gutenberg Block add element in the Editor inside InnerBlocks after div – editor-block-list
- Gutenberg – What is the best way to save/update post meta?
- How do you render_callback for register_block_type to a method in another class?
- How to create multiple Gutenberg blocks in one plugin
- How to get color name in PanelColorSettings in custom Gutenberg block?
- Are block templates incompatible with serialize_blocks?
- WordPress Block Development – trouble importing from @wordpress/icons
- Widget is to be compatible with all themes
- Is there an additional block.json property to set to get an InnerBlocks child to respect the “supports” property?
- How to setAttributes in Gutenberg block?
- How to access noticeOperations from withNotices
- How to prevent UNDO on guternberg block editor
- How to insert text at the current cursor position in Gutenberg?
- How to override gutenberg paragraph block edit property
- Do I have to worry about useState causing a re-render?
- What’s the right way to instantiate new blocks and/or the plugin itself in toto when using wppb architecture?
- Creating a custom Gutenberg block with columns
- How to get boolean value from register_meta properly?
- JSX in WordPress Plugin Development
- How can I get the selected string when using a toolbar button in Gutenberg?
- jQuery selectors for editor elements safe to use?
- There is a problem in the gutenberg block I developed. Problem is with withInstanceId
- Serve text/html from wp-json API via WPEngine, headers not being set properly
- How to remove default style of header in wordpress metabox
- CSS not affecting widget output
- How to control an elements classes from multiple Gutenberg sidebar controls?
- How to only load css for used blocks on frontend
- Additional classes `undefined` after saving post in Gutenberg
- How do you submit a Gutenberg plugin?
- Invalid hook call on save, not edit when using swiper slider
- Proper way to use useSelect
- Use npm and wp-env to make production bundle
- How to change WooCommerce loop product title HTML output in single product page and archive page
- How to save post meta as an array in Gutenberg?
- Developing the save function in Gutenberg blocks
- WordPress Gutenberg InnerBlocks renderAppender not showing with template
- Include HTML (Bootstrap Modal Box) with a plugin into my header
- Font size of HTML content
- Console errors in 6.0-RC1 Widget screen
- How to override supports of innerBlocks?
- How to use attributes in competent of Gutenberg
- wordpress full site editing problem when extending core blocks
- Pass custom props to
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- extraprops override existing props
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- WPGut – Updating failed and shortcode?
- Rerender core Templates with with ToggleControl but it doesnt recognize block type
- Gutenberg – Call google map render function in save after DOM has been rendered
- HTMLCollection not counting right in editor? / for loop not working on elements in DOM
- Is “document loaded” different on admin side than public side?
- How to use setAttributes outside of the edit function return
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Where do I hook to have the server do something in PHP on block attribute change?
- Reading plugin settings in esnext wordpress block
- How to integrate plugins into block editor
- How do I show the HTML descrption in wordpress photo gallery for my individual gallery pages?
- How to get access the ID of all posts of custom post type in Gutenberg editor
- How to create save function for custom Gutenberg style block?
- Implementing Select2 plugin into WordPress
- Which subset of html does WordPress support?
- Custom plugin not appearing
- Gutenberg’s Popover component position relative to the focused element
- How can i add insertion point between inner blocks in my custom block like core blocks
- Render raw html in Gutenberg block
- get the queried_object of an url
- Build a dynamic block using the default attributes
- Add custom data-attribute to core Gutenberg block within an template
- Call API on post save/update and show the result in admin area
- How to create A – Z List with pictures?
- How to replace content of a block in and re-render on change?
- extending a core block doesn’t work inside the editor
- How can I include React useState in a custom gutenberg block plugin?
- Remove Gutenberg Buttons Block
- Insert text programmatically in WordPress Gutenberg Editor
- WordPress 6.6.1 – Trying to make a block but receive error, “! Cannot read property ‘then’ of undefined”
- How to use useSelect to retrieve the currently default fontFamily?
- Event when Modal is opened/visible
- Template locked block does not show appender
- Multiple php files in dynamic gutenberg block
- My WordPress plugin don’t show the button on Gutenberg
- Gutenberg InnerBlocks noallowedblocks on parent but allowedblock on Child
- Warning: Cannot update a component (`Unknown`) while rendering a different component
- Custom Gutenberg Block ‘Stylized List’ – Incorrect Rendering and Looping of List Items
- Rebuild Core Block as Separate Plugin
- Using @wordpress/scripts 28.x with WordPress
- Gutenberg move post/page title to Editor sidebar document panel
- configure additonal build files in the @wordpress/create-block
- Is It Possible to Use the Block Editor’s Notification Feature to Send Another Notification After the Post Is Saved?