tiny_mce皮肤的问题

时间:2011-02-23 20:10:39

标签: ruby-on-rails controller tinymce skin

我有我的博客的控制器,我在那里使用tiny_mce。

我的应用程序包含clans,属于clandesigns,这个clandesigns有一个列clandesign.tinymce_skin 博客belongs_to clan

http://pastie.org/1599354

我的问题是,即使我使用此控制器中的设置:current_user.nick,我只得到:

//<![CDATA[
tinyMCE.init({
editor_selector : 'mceEditor',
language : 'en',
mode : 'textareas',
plugins : "spellchecker,pagebreak,layer,table,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
skin : '{current_user.nick}',
spellchecker_rpc_url : '/blogs/spellchecker',
theme : 'advanced',
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "search,replace,bullist,numlist,outdent,indent,blockquote,undo,redo,link,unlink,image,cleanup,preview,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,hr,removeformat,visualaid,sub,sup,charmap,iespell,media,advhr",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,styleprops,spellchecker",
theme_advanced_resizing : true,
theme_advanced_statusbar_location : 'bottom',
theme_advanced_toolbar_align : 'left',
theme_advanced_toolbar_location : 'top'

});
//]]>

皮肤:'{current_user.nick}'

感觉就像我尝试了#{},“,',...的每一个组合,并且有2个选项,我得到一个未定义的方法错误或tiny_mce只是将字符串加载为皮肤名称

也许有人可以帮助/给我代码来替换current_user.nick。最后我想有像find_clan.clandesign.tinymce_skin

这样的东西

1 个答案:

答案 0 :(得分:1)

您可能希望将您的皮肤置于/tiny_mce/themes/my_custom_skin下并使用theme: "my_custom_skin",解决。