4
votes

I am building a small webapp for my website and have included tinyMCE as visual editor. My site uses a free template and the contentarea has the id #left_side, which almost all styles refer to, that are relevant in articles.

So the editor is kind of wysiwyg, but the styles are wrong, because my styles, that I provided as content_css, won't fit.

I assume that is, because the #left_side id is not anywhere in the iframe.

I have googled for quite some time now and found no way to get tinyMCE to add for example a div with this ID around the editor content, so the css will work.

I don't think that it's hard to accomplish, I currently have just no idea how... :-/

Any ideas?

EDIT: The content CSS is added like this:

tinyMCE.init({
    // General options
    mode : "textareas",
    theme : "advanced",
    plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

    // Theme options
    theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
    theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
    theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true,

    // Example content CSS (should be your site CSS)
    content_css : "/cms/static/style/site.css",
    ....
1
how did you set the content_css ? please provide your tinymce initThariama

1 Answers

6
votes

Not sure about it, but maybe one of the following configuration options could do it.

Please see also my other comments in Skype.