你必须下载你的并解压它。
然后你必须将每个js文件放入tinymce文件夹的相应文件夹中。
您必须指定language http://www.tinymce.com/wiki.php/Configuration%3alanguage以及。
如果您正在使用TinyMCE - jQuery 插件 http://www.tinymce.com/wiki.php/jQuery_Plugin你必须做这样的事情:
// Initializes all textareas with the tinymce class
$(document).ready(function() {
$('textarea.tinymce').tinymce({
script_url : '../js/tinymce/jscripts/tiny_mce/tiny_mce.js',
theme : "advanced",
language: "hi",
...
});
});
如果您想从文本区域中删除tinyMCE(我想如果您想重置语言,则必须这样做),您可以使用以下代码:
tinyMCE.execCommand('mceRemoveControl', false, 'mycontrol_id');
作为指定here http://www.tinymce.com/wiki.php/Command_identifiers.
您可以使用相同的代码重新创建它。
您可以将所有内容包装在函数中并传递语言参数:
function setup(language) {
tinyMCE.init({
mode : "textareas",
theme : "advanced",
language: language,
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
}
如果你想删除buttons http://www.tinymce.com/wiki.php/Configuration%3atheme_advanced_buttons_1_n从工具栏中,您必须执行以下操作:
theme_advanced_buttons1
theme_advanced_buttons2
...
删除那些你不需要的。
有所有按钮和插件的列表here http://www.tinymce.com/wiki.php/Buttons/controls.
如果您想添加自己的按钮,您可以找到示例here http://www.tinymce.com/tryit/custom_toolbar_button.php.
UPDATE:
由于您使用了自己的插件,我猜您已经在插件部分中定义了它:
tinyMCE.init({
mode : "textareas",
theme : "advanced",
language: 'hi',
plugins : "myPlugin, pagebreak ... ",
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "myPlugin",
...
});
如果您不想显示它,只需将其从列表中删除即可主题_高级_按钮2.