Are you sure you want to write an entire editor, rather than just a plugin for the existing Atto editor?
A plugin would be much simpler than writing the whole editor (which is a big task).
A basic introduction to Atto plugins can be found here: https://docs.moodle.org/dev/Atto