karaxnim / karax

Karax. Single page applications for Nim.
MIT License
1.07k stars 90 forks source link

There is no easy way to use custom tags (like <dialog>) #223

Open veksha opened 2 years ago

veksha commented 2 years ago

There is no easy way to use custom tags (like dialog). Is it possible to add it somehow?

my workaround:

verbatim """<dialog>"""
....
verbatim """</dialog>"""

ps: dialog is not a custom tag, actually. but it doesn't matter anyways. doesn't work.

Araq commented 2 years ago

The point is to detect mistakes, if everything compiles there would be no checking. But feel free to add "dialog" to the list of known tags.

veksha commented 2 years ago

The point is to detect mistakes, if everything compiles there would be no checking. But feel free to add "dialog" to the list of known tags.

Can the code of karax be modified in such a way that the user will be allowed to add custom tags in the his code explicitly, without issuing PR for every new tag or modify local sources of karax?

Araq commented 2 years ago

I remember such a mechanism to exist but I forgot how it works. And maybe I misremember, but it's a solid feature request.

Massolari commented 1 year ago

In Elm we have functions for each tag, but there is a function called Html.node that's used to custom (or not implemented) tags, this function gets a String as a parameter that's the name of the tag, for example:

Html.node "dialog" [] []

Maybe Karax could have something like that