Open shokurov opened 6 years ago
Hi @shokurov! Thanks for checking out HEML :) It turns out you can pass in your own elements in the options object you pass to the exported heml
function:
const heml = require('heml')
heml(`<heml>...</heml>`, { elements: [ /* elements go here */ ] })
There isn't much documentation on custom elements yet (that will be coming soon I believe), but I they need to be created using the createElement
function found in @heml/utils
. I would look at the elements in @heml/elements
for which attributes are accepted.
Thanks for pointing out!
This definitely needs a bit more documentation..
Please, could you clarify couple more things:
As I see from the heml-elements/index.js there is no mechanism for plugging in additional components. That limits usability and, I believe, prevents real world use in large projects.
I understand that SparkPost would be having trouble allowing custom JS to be run within parse or render phases on their servers, however adding extension mechanism would have grand effect on spread of HEML as open standard.