gpt4 book ai didi

javascript - TinyMCE:如何摆脱一些按钮

转载 作者:搜寻专家 更新时间:2023-11-01 05:14:52 24 4
gpt4 key购买 nike

我正在尝试最小化 TinyMCE 的实现。我想要的唯一按钮是粗体、斜体、字体大小、字体颜色、链接和撤消/重做。

我已经从他们的 fiddle 演示中删减了示例,并且我已经能够删除许多不需要的按钮。

这就是我将 init 减少到的内容,但我看不出还有什么可以消除的。有没有我找不到的单独配置?有了这个,我仍然得到列表按钮、 super /下标和删除格式并插入特殊字符...

tinyMCE.init({
// General options
mode: "textareas",
theme: "advanced",
plugins: "", //note, i've removed every plugin for demnstration, stll have unwanted buttons

// Theme options
theme_advanced_buttons1: "|,bold,italic,|,fontsizeselect,|,forecolor,",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: true,
theme_advanced_text_colors : "FF00FF,FFFF00,000000",
width: "100%",
height: "400"
});

最佳答案

在主题选项下,您可以使用 theme_advanced_disable 输入要禁用的内容。例如要去除下标和上标按钮,添加以下代码:

theme_advanced_disable : "sup,sub"

关于javascript - TinyMCE:如何摆脱一些按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10093621/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com