mrml icon indicating copy to clipboard operation
mrml copied to clipboard

registerComponent in MRML?

Open murphycw opened this issue 1 year ago • 3 comments

MJML has a registerComponent function. Does MRML have an analogous function? I did trying looking. Apologies if I missed it. If not, do you have a recommendation for using custom components with MRML? Thanks!

murphycw avatar Oct 25 '24 11:10 murphycw

Hey!

Thanks for your interest in MRML! Unfortunately, right now, it's not possible to implement your own component in MRML. In the meantime, if your component can be split into known components/elements, you can use mj-include instead.

I'll start thinking about it though.

jdrouet avatar Oct 26 '24 07:10 jdrouet

To get more into details about this. Right now, all the components are built on top of enums. Which means there is no dyn components, which avoids the use of a dynamic table, which improves the performances by a lot. Having a way to register components would imply a degradation of the performance. I will create a poc for that and see if I can make a feature for that so that it's an opt in... I'll keep thinking about it...

jdrouet avatar Oct 27 '24 14:10 jdrouet

Thanks for the update and for your consideration!

christopher-w-murphy avatar Nov 01 '24 11:11 christopher-w-murphy