Search code examples
ruby-on-rails-3tinymcetinymce-rails

tinymce-rails custom skin not working


I'm using tinymce-rails gem (version 3.5.9) and wish to add a custom skin thebigreason

My question is two pronged I suppose:

  1. The tinymce-rails wiki says to add the skin to:

    tinymce/themes/advanced/skins/
    

    So I dropped the 'bigreason' folder into the following directory:

    app/assets/tinymce/themes/advanced/skins/
    

    In tinymce.yml config file I did as instructed and loaded my skin:

    theme : "advanced"
    skin : "thebigreason" 
    

    But the original theme still exists. I've restarted the server

  2. Where does this gem keep all the files! I had to create the tinymce folder mentioned above. A bit of a generic question but I will want to adjust the contents css etc later

EDIT:

Forgot to mention, application.css contains the following:

*= require /tinymce/themes/advanced/skins/thebigreason/content.css
*= require /tinymce/themes/advanced/skins/thebigreason/ui.css
*= require /tinymce/themes/advanced/skins/thebigreason/dialog.css

Thanks


Solution

  • I did figure it out now: I had the default skin defined below.

    To (slightly) redeem myself this is how it's done:

    Place skin here:

    app/assets/stylesheets/tinymce/themes/advanced/skins/{skin_folder_with_css_files}
    

    and the config will do everything else. Include a path to this skin in applications.css for asset compilation later:

    *= require /stylesheets/tinymce/themes/advanced/skins/{skin_folder}/{css_file.css}
    

    One issue that I see is that some skins have body tags with margins, header definitions and so on which is bound to wreak havoc with the Rails asset pipeline .