Monday , 29 May 2017
Home » HTML Editors » [TinyMCE] Apply CSS to TinyMCE Editor Same look as Front Page
[TinyMCE] Apply CSS to TinyMCE Editor Same look as Front Page

[TinyMCE] Apply CSS to TinyMCE Editor Same look as Front Page

Hi Friends,

Do you want to see same design as your front page in TinyMCE Editor ? If so, you need to add css styles when you initialize the TinyMCE editor script. Once you add it, it will apply css to tinymce editor and you see same design look as your front page. Your client can have clear idea how it will look in front end. Must do this to impress your client and make him happy. Here are various ways to add/import css file to tinymce editor.

1. Absolute Path
tinyMCE.init({
 ...
 content_css : "/style.css"    // or http://phpfreelancedevelopers.com/style.css
});
2. Relative Path
tinyMCE.init({
 ...
 content_css : "style.css"    // or ../style.css
});
3. Multiple files
tinyMCE.init({
 ...
 content_css : "style1.css, style2.css"    // or ../style1.css, ../style2.css
});

If you want to add more than one files than you can do the same by separating them with comma.

      
Plugin by: PHP Freelancer

About Rakshit Patel

I am PHP Freelancer, Rakshit Patel working as PHP Programmer India. I have developed this site to share my knowledge, thoughts and experience during the development of projects. We are group of developers working together. If you want to hire us for any PHP related work, you can reach me via Email, Phone or Chat.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.