Small refactoring for new wysiwyg