BBCode syntax highlighting #9258
Replies: 4 comments 3 replies
-
In theory it could be done with an addon, by the way. See also https://docs.godotengine.org/en/stable/classes/class_editorproperty.html and https://docs.godotengine.org/en/stable/classes/class_editorinspector.html |
Beta Was this translation helpful? Give feedback.
-
I agree, editing BBcode is a pain a could be made better. I would also suggest autocomplete. If you write a open tag, it could close automatically, just like () in gdscript. |
Beta Was this translation helpful? Give feedback.
-
Even if it could be done in a plugin, I'd say this is a big enough QoL change to warrant it being in the base engine (especially considering it doesn't need a new component either). |
Beta Was this translation helpful? Give feedback.
-
We have We can probably add The implementation of We'd need to change EditorPropertyMultilineText's constructor so it accepts an enum with a language type instead of a boolean, but this should be feasible as this API isn't exposed to scripting. Developing the highlighter itself might prove nontrivial though. You can see my attempt at creating a XML syntax highlighter which didn't quite look perfect, although it was still better than nothing. I'd like different tags to be highlighted differently based on their depth or purpose (color, size, alignment), rather than having all tags be highlighted with the same color. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When working with RitchTextLabel and BBCode, especially when using multiple tags, it's incredibly difficult to tell where a tag starts and where it ends. It's also hard to distinguish between tags, options, values and regular text. As such, I think having a syntax highlighting for BBCode would greatly improve its ease of use. See current readability in screenshot below:
One last suggestion is to highlight custom BBCode tags differently from the default tags, if possible.
The implementation is up to you, from reusing existing highlight colors of regular code from the Text Editor setting or adding new colors with BBCode prefix/suffix in their name or something else. I don't have experience to tell if this should be in the core or done using GDExtension.
Beta Was this translation helpful? Give feedback.
All reactions