refactoring richtext styles