でDocumentBaseUrlを変更することはできませんTinyMCEの負荷は生産で、私は4つの404エラーを取得する場合:たぶん、これらのファイルはtiny_mce.jsから非同期と呼ばれているは、私はRailsの3.2.3を使用していて、TinyMCEの
"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"
を彼ら理由私のソースには載っていません。私の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);
}
私のTinyMCEのファイルのすべてのdirアプリ/資産/ JavaScriptの/ tiny_mceであるので、私は関係なく、私はそれらを設定したもの、私のinitのparamsにdocument_base_url
とbase_url
を追加しようとしたん、しかししています私が火かき棒でTinyMCEを検査するとき、彼らの値は私が入力したものに変わらないことがわかります。
私はKETEによってRailsのプラグインはTinyMCEのために存在することを認識していますが、それはRailsのために推奨されていないことをits READMEアメリカ合衆国> = 3.1
に追加することにより、資産piplineを遵守されます。http:// stackoverflowの。 com/questions/7325364/tinymce-loading-lang-plugins-theme-from-incorrect-directory –