Script editor with syntax highlight at runtime

We are developing a game which allow player to type Lua script and mod the game in Runtime. I’ve found that it’s extremely hard to make it working and look nice with UGUI’s InputField…

What we want at this stage is Syntax Highlight and may be Code Completion.

So far I’ve completed some syntax highlight function using Regex, but it only works after input field end edit (on UI.Text but not UI.InputField):

In other words, I want a SI3 but in runtime and Lua.

I can’t find any solution out there. Anyone can give me a hint? Or should I use Text Mesh Pro, etc, to make the solution easier?

Just to answer my question if anyone interested.

I’ve contacted the author of SI3 and Code Editor, both of them said it won’t be an easy task and require weeks of work.

Right now I just stick with the Regex solution first and go deep into it when we have more resources.