我实现了tinyMCE jQuery包,我删除了一些富文本选项,因为我的网站不需要它们,但我仍然将它们显示在页面上。
以下是发生这种情况的示例:http://www.problemio.com/add_problem.php
我试图只显示第一行富文本选项,并且不确定第二行和第三行出现的原因。正如您在下面粘贴的JS中所看到的,我删除了第二行和第三行的说明,但它们仍然出现:
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/black-tie/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<!-- Load jQuery -->
<!--<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.3");
</script>
-->
<!--<script type="text/javascript" src="/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>-->
<script type="text/javascript" src="/js/tinymce/jscripts/tiny_mce/jquery.tinymce.js"></script>
<script type="text/javascript" src="http://www.problemio.com/js/problemio.js"></script>
<!-- Load jQuery build -->
<script type="text/javascript">
$(function() {
$('textarea.tinymce').tinymce({
// Location of TinyMCE script
script_url : '/js/tinymce/jscripts/tiny_mce/tiny_mce.js',
// General options
theme : "advanced",
plugins : ",style,advimage,advlink,emotions,paste,",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,|,emotions,|,bullist,numlist,|,link,image,",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
//theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
//template_external_list_url : "lists/template_list.js",
//external_link_list_url : "lists/link_list.js",
//external_image_list_url : "lists/image_list.js",
//media_external_list_url : "lists/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
});
</script>
答案 0 :(得分:0)
我最近遇到过这个问题,所以万一其他人遇到这个问题就是解决方案:http://www.tinymce.com/wiki.php/Configuration:theme_advanced_buttons_1_n
您需要在配置选项中添加以下行:
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : ""