Web Components and custom elements


#1

Matrix Version: 6.27

Hi everyone, I’m wondering if anyone is using Web Components’ custom elements (either autonomous or customised built-ins) with the standard WSYWIG editor?

Currently, the editor is quite aggressive at removing non-standard and empty elements.
Using custom elements is possible in a code container, but it isn’t a great solution IMO. One can add custom attributes in the source view but that can be daunting for many authors.

Any tips on how to make this work?


#2

Preface this by saying we are not using them.

The simple answer would be to create your own (matrix) components.
https://docs.squiz.net/matrix/version/latest/features/design-assets/component-templates.html


#3

Yes, have developed a few components already. They’re quite useful and still evolving.
But, they’re not quite fit for this purpose. They can’t be used for inline rich elements or as nested elements without specific efforts to wrap their output contents.


(Luke Jennings) #4

I agree, being able to control the aggressive of the WYSIWYG in stripping out elements would be handy. Can imagine this with web components.