• I am registering my own richText format type for the Gutenberg editor. I can see that inline images are added using the insertObject function https://github.com/WordPress/gutenberg/blob/master/packages/format-library/src/image/index.js#L60

    This inserts an image tag by using a javascript object that describes the img tag to insert.

    However, in my case I want to add an html tag inside another html tag. A simplified version might be…

    <svg class="something"><use href="pathtoiconfile#icon"></svg>

    There doesn’t seem to be any information anywhere about how to define html tags as objects (for example – what can you include apart from type: and attributes:, if anything).

    I am not sure if it is worth writing here, on the Gutenberg github repo, or ask somewhere on Slack. Can anyone help?

    • This topic was modified 5 years, 2 months ago by James Bonham.
  • The topic ‘Inserting html via insertObject into Gutenberg’s RichText’ is closed to new replies.