How to customize code editor?

Godot Version



I have a dialog system where I write dialogs in godot scripts, in godot code editor. Something that looks like that :

Alice.say("Hello Bob")
Bob.say("Hi Alice")

I would like to enhance the godot editor so I can easily write BBCode. To be more precise, I would like to add a context sub menu to add BBCode tokens on selected text. So for example, I could select Hi Alice then right click → BBCode → Wave, so it becomes [wave amp=50.0 freq=5.0 connected=1]Hi Alice[/wave].

It could be presented a bit differently : instead of a context sub menu, it could be a toolbar menu, for example.


How can I customize the godot code editor so I could add these customs behaviours ?
How can I access godot code editor through addons ? How can I modify it through addons ?

Obviously you can do it with plugins. Plenty of tutorials. Another way is to simply add a parameter to Alice.say(“Hello Bob”) to tell it what kind of bbcode to wrap it in.

Thanks for your answer but could you direct me to a tutorial that specifically explains how to access godot code editor and to modify it through plugins ?