2011-02-23 141 views
1

我有這個控制器爲我的博客和即時通訊使用tiny_mce那裏。tiny_mce皮膚問題

我的應用程序由氏族,這belongs_to的clandesigns,這clandesigns有clandesign.tinymce_skin 博客列belong_to氏族

http://pastie.org/1599354

我的問題是,即使我用這個控制器的設置:CURRENT_USER。千鈞一髮之際,我只得到:

//<![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個選項,我得到一個indefined方法錯誤或tiny_mce只是用來加載字符串作爲皮膚名稱

也許有人可以幫助/給我代碼來取代current_user.nick。最後我想在那裏找到像find_clan.clandesign.tinymce_skin

回答

1

你可能想要把你的皮膚放在/tiny_mce/themes/my_custom_skin並使用theme: "my_custom_skin",來解決它。

+0

亞工作,這個問題是,忘了在我的第一篇文章中提到它。博客嵌套在氏族之後。所以我想訪問一個皮膚,該名稱存儲在clandesigns表中,屬於特定設計 – malice 2011-02-24 14:49:51

+0

sry,在這種情況下我不知道這是否可能 – Thariama 2011-02-24 15:46:44