I am looking 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 = EditorPlugin.new().get_editor_interface()
var se:ScriptEditor = ef.get_script_editor()
var sc:Script = se.get_current_script()
print(sc.source_code)