If you think that Primrose is neat, checkout Daniel Earwicker's carota editor. It's based on a similar idea and has way more features, as well as a license that won't hose your project (MIT):
Caveat: Carota does not solve Right-To-Left text or complex scripts, and I'd really appreciate help with that. It's the only blocking issue against me using it in my main work project.
(By a strange coincidence I use the codename Primrose in an unrelated project...)