estoy usando Rails 3.2.3, y cuando las cargas TinyMCE en la producción, consigo cuatro 404s:No se puede cambiar DocumentBaseUrl en 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"
Tal vez estos archivos se denominan de forma asíncrona desde tiny_mce.js porque no aparece en mi fuente Mis js se ve así:
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);
}
Todos mis archivos TinyMCE se encuentran en la aplicación dir/activos/javascript/tiny_mce, por lo que han intentado añadir document_base_url
y base_url
a mis Parámetros Inic, pero no importa lo que les puse , cuando inspecciono TinyMCE en Firebug, veo que sus valores no cambian a lo que he ingresado.
Soy consciente de que existe un plugin de rieles por Kete para TinyMCE, pero its README declara que no se recomienda para Rieles> = 3.1
La respuesta a esta cuestión ha ayudado mucho: http: // stackoverflow. com/questions/7325364/tinymce-cargando-lang-plugins-theme-from-incorrect-directory –