简体   繁体   English

TinyMCE自定义菜单-拼写检查器语言下拉菜单

[英]TinyMCE custom menu - Spellchecker language dropdown

I am implementing TinyMCE in my application and have created a custom menu bar. 我在应用程序中实现TinyMCE,并创建了一个自定义菜单栏。 The problem that I am facing is that I do not know how I can add the languages dropdown for the spellchecker pro plugin to my menu bar. 我面临的问题是我不知道如何将拼写检查器专业版插件的语言下拉列表添加到菜单栏中。

TinyMCE TinyMCE的

Version: V4 版本: V4

Source used in my app: TinyMCE Source 我的应用程序中使用的来源TinyMCE来源

MenuControls: docs MenuControls: 文档


My current setup: 我当前的设置:

export const editor = {
    elementpath: false, // Disable html display in bottom bar ('p >> span' for example)
    branding: false, // Disable 'powered by TinyMCE' text
    height: '100%',
    resize: false, // Disable editor resize
    fontsize_formats: '8pt 11pt 12pt 14pt 18pt 24pt 36pt', // Font size options

    menu: {
        edit: {title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall'},
        insert: {title: 'Insert', items: 'image link media | charmap hr | pagebreak anchor toc'},
        format: {title: 'Format', items: 'removeformat bold italic italic strikethrough subscript superscript |  blockformats align'},
        tools: {title: 'Tools', items: 'visualchars searchreplace spellchecker translate'},
        table: {title: 'Table', items: 'inserttable tableprops deletetable | row column cell'},
    },

    toolbar1: font + ' | ' + list,
    toolbar2: formatting + ' | ' + align + ' table',
};

The result: 结果: 编辑结果

But the misses the list of spellchecker languages: 但是错过了拼写检查器语言列表: 语言工具


Does anyone know what key I should use for this dropdown? 有人知道我应该为该下拉菜单使用什么密钥吗? I cannot find it listed in the docs or in their code . 我在文档或他们的代码中找不到它。 It looks like the does not exist? 好像不存在?

Update 更新

I should have read the docs better. 我应该更好地阅读文档。 I read the docs of the 'spellchecker plugin' instead of the 'spelchecker pro plugin' which I ment. 我阅读了“ spellchecker插件”的文档,而不是我提到的“ spelchecker pro插件”的文档。 The answer is that you should add the key spellcheckerlanguage to your menu. 答案是您应该在菜单中添加按键spellcheckerlanguage

Your second screenshot appears to be one for the SpellChecker Pro premium plugin and not the open source Spellchecker plugin. 您的第二个屏幕快照似乎是SpellChecker Pro高级插件的一个,而不是开源Spellchecker插件的。

The SpellChecker Pro product includes the languages shown in that select list. SpellChecker Pro产品包括该选择列表中显示的语言。 The open source Spellcheck plugin requires you to setup your own server side spelling engine and referencing those languages yourself. 开源的Spellcheck插件要求您设置自己的服务器端拼写引擎并自己引用这些语言。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM