Improvements to rich editor