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

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

إعجاب واحد (1)

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