0 votes

Hello, I'm trying to make some sort of code editor to write and edit code on runtime and I want to have highlights on certain keywords.

Now, I know that the textEdit node have built-in syntax highlight and other code related functionalities but, I want to highlight custom keywords, since this code editor would have a fake scripting language with custom keywords.

Now my question is, can I somehow edit the built-in highlighting feature of textEdit or, maybe easier, highlight certain words on textEdit or text labels by code?

Thank you in advance!

in Engine by (40 points)

1 Answer

+3 votes
Best answer

add_keyword_color(String keyword, Color color) and
add_color_region(String beginkey, String endkey, Color color, bool line_only=false)

by (82 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.