Whitelist HTML element which is a custom element (web component)

AI-generated summary

A discussion is underway about whitelisting a custom HTML element (web component) in Discourse. amundo is seeking to make their library of custom elements available to users and inquired about the possibility of whitelisting them. They referenced the bbcode wrapper theme component but found it unclear. amundo noted that plugin examples show HTML elements being whitelisted and wondered if this approach could work for custom elements with dashes, such as <interlinear-text>. abk expressed interest in using Web Components on Discourse for consistent elements across their web properties. However, amundo reported no success due to a lack of response.

Is it possible to whitelist a custom element?

I have a library of custom elements I have written, and I would like to make them available to my users. @pfaffman pointed out the bbcode wrapper theme component by @j.jaffeux, but that seems to be more about… well to be honest I’m not sure I understand the relationship of the input and the output in the example.

In plugin world, there do seem to be clear examples where particular HTML elements are “whitelisted” —there’s a fair amount of code but if it boils down to just following a template like this in order to get my closed set of custom elements working, I could probably figure it out:

It’s pretty easy to understand how that code is working.

Would it work as well if the tag in question were a custom element (which of course has a dash), like, say, <interlinear-text> (which I have already defined outside of Discourse)?

Hi @amundo ,

Have you had any success with this? I’m investigating the use of Webcomponents on Discourse to add consistent elements across our web properties.

Best,
ABK

No, as you can see there was no response. :man_shrugging:t4: