How do can I get the the current text of the editor from EditorPlugin

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wyattb

I am looking for my tool, for the equivalent of get_current_script() but to get the text from a .txt file instead of a gd file. Something like a TextEditor. But it is not available/exposed in gdscript. TextEdit does not provide a reference to the Editor interface.

tool extends EditorPlugin

var ef =
var se:ScriptEditor = ef.get_script_editor()
var sc:Script = se.get_current_script()