Fixes for richtext editing