Why not take it one step further and customize the skins and icons for an even slicker UX. Similarly, you can use these to remove other values for users, so they can only use styles that are on brand. If you change the default font styles to values that are not in the TinyMCE menus and toolbars by default, you can add them using the font_formats, font size, and color options. Updating the default font options in menus and toolbars Read our documentation about content_style for more information. ![]() In this case, use the content_style property in your initialization script and specify your desired styles for the editor within that.įor example, you could match the colors of your site, but use a larger, non-cursive font for the editing process: Or if you want certain coloring, or larger fonts, to assist you through the writing process, but you don’t want them appearing on the published page. For example, if the font on your published page is quite decorative, but it’s easier to write with a more standard font. Or, so it deliberately does NOT match your published page styles. ![]() You might do this to match only some of the editor styling with your page CSS, without pulling in the whole stylesheet. Just remember, when you use this option, what you see in the editor will not necessarily be what you get in your published content. Override editor styles using content_styleĪlternatively, there’s a simple way to override the editor CSS, regardless of whether it’s the default CSS or a stylesheet you’ve provided with content_css. Read more about content_css in our documentation. Screenshot of TinyMCE editor with cursive font matching website. You have the following style defined in a file called mycontent.css.Īnd - hey presto - the editor CSS matches that of your web page. Okay, let’s say your website uses white cursive text on a darker background. ![]() If you want the styles in the TinyMCE editor to match the styles on your published page, for a true WYSIWYG experience, the best option is to initialize TinyMCE with the same CSS file that your site uses.įor example, let’s say your website uses white comic sans…no.I can’t quite bring myself to use that example. Match editor styles to your published content using content_css Read on for more detailed examples of usage and information about how to change the default styling options displayed in the TinyMCE menus and toolbars.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |