0 votes
add_keyword_color("<hello>",Color(0.929688, 0.91658, 0.09079))
Godot version 3.3.4
in Engine by (30 points)

1 Answer

0 votes
Best answer

make sure that Syntax Highlighting is selected in the inspector for the TextEdit or LineEdit node.

and i reccomend using this instead.
func ready():
add
color_region("<hello",">",Color(0.929688, 0.91658, 0.09079))

by (58 points)
selected by

Great ! Thank you

your codes working now but having problem when i added other tags to code

it only wok on first tag and other tags make whole line same color

add_color_region("<hello",">",Color(0.980469, 0.965388, 0.01532))
add_color_region("<helloone",">",Color(0.01532, 0.188745, 0.980469))
add_color_region("<hellotwo",">",Color(0.980469, 0.761802, 0.01532))

sorry my fault forgot to add line flags this code works perfectly

add_color_region("<hello",">",Color(0.980469, 0.965388, 0.01532),true)
add_color_region("<helloone",">",Color(0.980469, 0.286768, 0.01532),true)

just woke up, sorry for the late reply. im glad you got it working.

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.