javascript - TinyMCE jQuery 包中出现额外的富文本选项

标签 javascript tinymce richtextbox

我实现了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>

最佳答案

我最近遇到了这个问题,所以如果其他人遇到这个问题,这里是解决方案:http://www.tinymce.com/wiki.php/Configuration:theme_advanced_buttons_1_n

您需要将以下行添加到配置选项中:

theme_advanced_buttons2 : "",
theme_advanced_buttons3 : ""

关于javascript - TinyMCE jQuery 包中出现额外的富文本选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7884278/

相关文章:

javascript - jQuery 在悬停时更改图像,然后在单击时保持图像

javascript - Node mongodb-native : insert an array of strings as documents

python - Django 的 TinyMCE

java - 如何使用 selenium/webdriver 将文本输入到tinyMCE编辑器中

c# - 有选择地为 RichTextBox 中的文本着色

javascript - 你怎么称呼这个错误,它是 CSS、JS、库错误吗?

javascript - 将线性渐变与动态背景图像相结合

tinymce - 我想在我的 Wordpress 插件中实现 TinyMCE。如何?

c# - 如何防止RichTextBox Append 导致OutOfMemory?

c# - 在 RichTextBox 中显示按钮