Topic was automatically imported from the old Question2Answer platform.
Asked By
axvemi
Hello.
So, as you probably know, you can enable Bbcode on a RichTextLabel.
Some examples of that are [b] [i] etc.
The thing is, I want to make a custom one, to be a preset of some of there, and maybe some changes. [b] + [i] + a custom effect.
I dont want to have to add all the tags each time that I want to use that, but a custom one that applies all those effects. For example
[custom_one] The text [/custom_one]
being the same as [i][another] The text [/i][/another]
I find it even more important when you are passing parameters.
Note the example [matrix]text[/matrix], backed by a method to implement the effect. I figure you can have a [customtag]text[/customtag] that implements your defaults.
Good luck!
Yes. I know about custom effects thanks. The problem is having a collection of those elements being called at the same time by just one tag.
I see, that’s cool and was my other suggestion. In a current project, there’s a custom resource that inherits from the rich text node with appropriate text fields. This references a constant class with the tag definitions in another resource; essentially what you’re proposing be built into the engine.