Introduce pre-defined styles that are available in the editor
|Reported by:||micasuh||Owned by:||azaozz|
Inline styling for content can be detrimental for theme upgrades and style refreshes. Currently, TinyMCE menu uses inline styles for paragraph alignments, text colors and background colors, font families, font sizes, etc.
Replace these inline styles with custom class names using either p, span, or div tags relative to what editor selects.
- If editor wants complete Post content to be text-align: right, insert one class name into surrounding div instead of surrounding it with new span tag and inline style.
- A phrase of text must stand out within a paragraph by changing the font-size and font-family. In this instance, add span, bold, or em tag with custom class instead of inline styles with font-size and font-family attributes.
Content aware styling: When an editor wants to make a complete paragraph bold or emphasized, these elements don't always need to be surrounded with strong and em tags. Complete paragraphs or multi-paragraphs should be classed and styled within CSS. Content aware styling means Wordpress knows when editor has selected a paragraph versus a sentence, phrase or word and adjusts accordingly.
These custom classes can be styled with new custom CSS file inserted within wp_head for all future builds of Wordpress. Designer can opt to turn off this feature and go back to current way of styling if he or she wants.
Change History (23)
comment:3 novasource — 5 years ago
- Cc novasource added
- Keywords best practices usability css added
- Resolution wontfix deleted
- Status changed from closed to reopened
- Keywords needs-patch dev-feedback added; tinymce inline style content aware styling classes custom classes editor best practices usability css editor removed
- Milestone changed from 2.8.5 to 2.9
- Component changed from TinyMCE to Themes
- Milestone changed from 2.9 to Future Release
- Summary changed from Introduce smarter TinyMCE menu by reducing inline styles and using content aware styling to Introduce pre-defined styles that are available in the editor
- Type changed from enhancement to feature request