我建立我的網站一個小的web應用,並已列入了tinyMCE作爲可視化編輯器。 我的網站使用一個免費的模板和含量 - 面積有ID #left_side,幾乎所有的風格是指,那些在文章相關。TinyMCE的編輯內容不正確的風格
所以編輯器是一種所見即所得的,但款式都是錯誤的,因爲我的風格,我作爲content_css規定,將不適合。
我認爲是的,因爲#left_side ID是不會在iframe中的任何地方。
我用Google搜索了一段時間了,發現沒有辦法讓TinyMCE的與周圍的編輯內容,此ID添加例如一個div,所以CSS將正常工作。
我不認爲這是很難做到的,我現在剛剛不知道如何...: -/
任何想法?
編輯: 內容CSS添加這樣的:
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",
....
你是怎麼設置的content_css?請提供您的tinymce init – Thariama