karax icon indicating copy to clipboard operation
karax copied to clipboard

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

Open veksha opened this issue 2 years ago • 4 comments

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.

veksha avatar Mar 22 '22 00:03 veksha

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.

Araq avatar Mar 23 '22 06:03 Araq

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?

veksha avatar Mar 23 '22 07:03 veksha

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

Araq avatar Mar 23 '22 20:03 Araq

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

Massolari avatar Nov 22 '22 20:11 Massolari