add_keyword_color NOT WORKING GODOT WITH SPECIAL CHARACTERS

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By abhinavsingh
add_keyword_color("<hello>",Color(0.929688, 0.91658, 0.09079))
:bust_in_silhouette: Reply From: reapersremorse

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))

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)

abhinavsingh | 2022-01-20 10:27

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

reapersremorse | 2022-01-20 15:25