Javascript rich text entity editor