无法在TinyMCE中更改DocumentBaseUrl

Jel*_*Cat 5 tinymce ruby-on-rails-3

我正在使用Rails 3.2.3,当TinyMCE在生产中加载时,我得到4个404:

"NetworkError: 404 Not Found - http://[my-domain]/[current-path]//langs/en.js"
"NetworkError: 404 Not Found - http://[my-domain]/[current-path]//plugins/fullscreen/editor_plugin.js"
"NetworkError: 404 Not Found - http://[my-domain]/[current-path]//themes/advanced/editor_template.js"
"NetworkError: 404 Not Found - http://[my-domain]/[current-path]//plugins/media/editor_plugin.js"
Run Code Online (Sandbox Code Playgroud)

也许这些文件是从tiny_mce.js异步调用的,因为它们没有在我的源代码中列出.我的js看起来像这样:

tinyMCE.init({
    theme: "advanced",
    mode: "textareas",
    plugins: "fullscreen, media",
    height: 300,
    relative_urls :true,
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,search,replace,|,bullist,numlist,|,outdent,indent,|undo,redo,|,link,unlink,anchor,image,cleanup,code,|,insertdate,inserttime,preview,hr,removeformat,visualaid,|,sub,sup,|,fullscreen,spellchecker",
    theme_advanced_buttons2 : "styleselect,formatselect,imageListBox,media",
    theme_advanced_buttons3 : "",
    editor_selector : "mceEditor",
    extended_valid_elements : "form[action|accept|accept-charset|enctype|method|name|onsubmit|id|name]",
    convert_urls : false,
    remove_script_host : false
});

function toggleTinyMCE(id) {
    if (!tinyMCE.get(id))
        tinyMCE.execCommand('mceAddControl', false, id);
    else
        tinyMCE.execCommand('mceRemoveControl', false, id);
}
Run Code Online (Sandbox Code Playgroud)

我所有的TinyMCE的文件在目录应用程序/资产/ JavaScript的/ tiny_mce,所以我也尝试添加document_base_urlbase_url我的初始化参数,但无论怎样我现在就写,当我在Firebug检查TinyMCE的,我看到他们的价值观不改变我输入的内容.

我知道kete的一个Rails插件存在于tinyMCE中,但它的README声明它不推荐用于Rails> = 3.1

Tha*_*ama 0

我不确定这是否对您有帮助,但您可以尝试一下。以下是有关tinymce常见问题解答的相对和绝对网址的部分:http://www.tinymce.com/wiki.php/TinyMCE_FAQ#Paths.2FURLs_are_in Correct.2C_I_want_absolute.2Frelative_URLs.3F