I did something smar
Posted: 13 Feb 2008, 17:55
I did something smart one time. It changed the language in the TinyMCE to Norwegian. But now i don't work anymore. I only thought I changed 'language : "en" to 'language : "no", or maybe "nb". Now it doesen't work anymore.
Is there a possibilty to have this to be done much more easily? Maybe ad a parameter in the language file? Do you understand?
function displaySimpleTinyMCEJS()
{
$js = '<script type="text/javascript">' . "\n";
$js .= 'tinyMCE.init({'. "\n"
.'mode : "textareas",'. "\n"
.'theme : "advanced",'. "\n"
.'language : "en",'. "\n"
.'plugins : "emotions",'. "\n"
.'editor_selector : "mceEditor",'. "\n"
.'theme_advanced_buttons1 : "bold, italic, underline, separator, strikethrough, justifyleft, justifycenter, justifyright, justifyfull, bullist, numlist, undo, redo, link, unlink, separator, emotions",'. "\n"
.'theme_advanced_buttons2 : "",'. "\n"
.'theme_advanced_buttons3 : "",'. "\n"
.'theme_advanced_toolbar_location : "top",'. "\n"
.'theme_advanced_toolbar_align : "left",'. "\n"
.'theme_advanced_path_location : "bottom",'. "\n"
.'extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|wid th|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|s ize|color|style],span[class|align|style]"
});' . "\n";
$js .= '</script>';
return $js;
}
Is there a possibilty to have this to be done much more easily? Maybe ad a parameter in the language file? Do you understand?
function displaySimpleTinyMCEJS()
{
$js = '<script type="text/javascript">' . "\n";
$js .= 'tinyMCE.init({'. "\n"
.'mode : "textareas",'. "\n"
.'theme : "advanced",'. "\n"
.'language : "en",'. "\n"
.'plugins : "emotions",'. "\n"
.'editor_selector : "mceEditor",'. "\n"
.'theme_advanced_buttons1 : "bold, italic, underline, separator, strikethrough, justifyleft, justifycenter, justifyright, justifyfull, bullist, numlist, undo, redo, link, unlink, separator, emotions",'. "\n"
.'theme_advanced_buttons2 : "",'. "\n"
.'theme_advanced_buttons3 : "",'. "\n"
.'theme_advanced_toolbar_location : "top",'. "\n"
.'theme_advanced_toolbar_align : "left",'. "\n"
.'theme_advanced_path_location : "bottom",'. "\n"
.'extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|wid th|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|s ize|color|style],span[class|align|style]"
});' . "\n";
$js .= '</script>';
return $js;
}