The world editor is written in Lua with few basic operations coded in C++ and exposed as tables to Lua.
It resides in the /lua/ge/extensions/editor folder, and in Lua as a table named editor. The core Lua files for various editor sections are located in that root folder.
The various editor tools (their GUI code and logic), are basically extensions located in the /lua/ge/extensions/editor/extensions, so if you want to add a new tool for the editor, you can create a file in that folder following the test.lua as a starting template.
The core editor API resides in the editor table, so to use the function one would call editor.someFunction(…) For deeper editor API work and function documentation, you can always check the /lua/ge/extensions/editor/api files and other several editor core files in the root of the editor folder.