Workaround For RichText Displaying Tags On Focus?

I’m trying to make a syntax highlighter for StudioCLI but I’m coming across the issue of RichText displaying the font tags.

Here’s a picture…

Focused (my cursor position is supposed to be between the “-” and the “g”, that’s where I clicked

Is there a workaround for these two issues?

I’ve had this issue before, and I think there’s one solution.

Have a text box that you type in, and a text label that shows the actual color. Set the text label’s text to the text box’s text every time it changes.


I already thought of this but then had to consider when someone would highlight the text. Since the label is over the box, it would show as if nothing was selected.

That’s true, and where I basically quit. Sorry, but I can’t help you from here.

1 Like

This must be possible since plugins like InCommand and Synmax feature live highlighting.

1 Like

(cc: @zCrxtix)

I figured it out. This also uses a TextLabel + TextBox.

  1. TextBox is above the TextLabel
  2. TextBox’s TextTransparency = 1
  3. When the Textbox’s text changes, update the TextLabel with the highlighted text

This will probably be taken down, but I don’t think TextLabels support multi-lines.