Check this out:
Maybe there are some ideas here that would be useful for the Mogan editor and/or language.