TinyMCE:启用单个按钮

发布于 2024-09-15 17:39:06 字数 82 浏览 1 评论 0原文

我可以添加单独的按钮吗?

我想给用户控制权,但不是太多的控制权,所以我需要启用一些按钮但禁用其他按钮。

这可以做到吗?

Can I add individual buttons?

I would like to give the user control, but not too much control so I need to enable some buttons but disable others.

Can this be done?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原来是傀儡 2024-09-22 17:39:06

我现在已经想通了。

你必须使用一个主题。我使用了预定义的主题,并在 init 函数中执行了此操作:

tinyMCE.init({
    theme : "advanced",
    mode: "exact",
    elements : "elm1",
    theme_advanced_toolbar_location : "top",
    theme_advanced_buttons1 : "bold,italic,underline,separator,"
        + "formatselect,bullist,numlist,link,unlink,image,separator,"
            +"undo,redo,cleanup,code,separator,charmap",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
});

将文本区域命名为 elm1,然后就可以开始了

I have figured this out now.

You have to use a theme. I used a pre-defined theme and I did this in the init function:

tinyMCE.init({
    theme : "advanced",
    mode: "exact",
    elements : "elm1",
    theme_advanced_toolbar_location : "top",
    theme_advanced_buttons1 : "bold,italic,underline,separator,"
        + "formatselect,bullist,numlist,link,unlink,image,separator,"
            +"undo,redo,cleanup,code,separator,charmap",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
});

You name your textarea elm1 and then your good to go

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文