fontsizeselect 参数未在tinyMCE 中添加按钮

发布于 2025-01-11 21:15:15 字数 982 浏览 1 评论 0原文

这是我的代码,应将 fontsizeselect 添加到菜单:

tinymce.init({
            selector: '#mytextarea',
            plugins: 'lists',
            toolbar:
                "fontsizeselect undo redo | styleselect | bold italic |  outdent indent | numlist bullist",
            fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt"
        });

但是 fontsizeselect 按钮不会出现。

本文 中,它提供了此命令来显示所有可用按钮 tinyMCE.activeEditor.ui.registry.getAll().buttons

但是,当我运行它时,fontsizeselect 参数未显示:控制台屏幕截图

我通过使用 npm install tinymce 从 npm 安装来创建我的应用程序,发现 此处

我不知道我错过了什么。我还需要安装其他东西吗?我在FF和Chrome上都试过了。

编辑:当我使用 TinyMCE 的云版本时,我的代码可以工作,但我想使用本地版本。

Here is my code that should add fontsizeselect to the menu:

tinymce.init({
            selector: '#mytextarea',
            plugins: 'lists',
            toolbar:
                "fontsizeselect undo redo | styleselect | bold italic |  outdent indent | numlist bullist",
            fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt"
        });

However the fontsizeselect button does not appear.

From this article it gives this command to show all available buttons
tinyMCE.activeEditor.ui.registry.getAll().buttons

However when I run it, the fontsizeselect parameter is not shown: screenshot of console

I created my app by installing from npm with npm install tinymce found here.

I can't figure out what I am missing. Are there other things I need to install? I have tried in FF and Chrome.

EDIT: My code works when I am using the cloud version of TinyMCE, but I want to use the local version.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文