Adding Styles to “Full HTML content with formatting and constraints for publishing” Columns
In this last post we looked at using “”Full HTML content with formatting and constraints for publishing” column types in lists and document libraries. When using this control, you can mark text and then select a style to apply:
You can replace this style list with your own styles. To do this, create new styles that start with “ms-rteCustom-“. These styles can be placed in the page itself (if only available for that one page) or in CSS files used by the page. For example, you might want to add a new style of the “EditForm.aspx” page for the list or library in which the Full Html Control Column is used. To do this:
- Using SharePoint Designer, open the “EditForm.aspx” page associated with the list or library.
- Add a style using the New Style … link in the “Apply Styles” pane, eg “.ms-rteCustom-MyStyle”.
- Save the file.
The style will be placed within a “<asp:content>” tag in the form:
Now, when the HTML editor is used, this new style will be available:
Note: The style list will only show styles when text is selected.