【问题标题】:I am not able to make spell checker working in angular ui tinymce我无法使拼写检查器在 angular ui tinymce 中工作
【发布时间】:2017-05-10 12:00:21
【问题描述】:

我正在使用 angular ui tinymce 创建富文本编辑器。我使用下面的代码在工具栏中添加了拼写检查工具 -

return {
            setup: function (editor) {
                self.$timeout(function () {
                    editor.focus();
                }, 200)
            },
            statusbar: false,
            menubar: false,
            browser_spellcheck: true,
            spellchecker_languages: 'English=en,German=de,Spanish=es',
            resize: false,
            plugins: 'textcolor colorpicker image anchor link lists advlist table paste spellchecker',
            toolbar1: "fontselect fontsizeselect styleselect | strikethrough bold italic | forecolor backcolor | link image ",
            toolbar2: "alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | spellchecker | table  undo redo",
            height: "400px",
        };

拼写检查选项正确显示在屏幕上,但无法正常工作。

当我点击拼写检查图标时,它给了我以下错误。

“未找到拼写服务:(未定义)”

enter image description here 你们能帮我如何使这个工作。我还检查了 .php 插件,但没有文档如何包含在 angular ui tinymce 中。

【问题讨论】:

    标签: angularjs tinymce tinymce-4 rich-text-editor


    【解决方案1】:

    您需要做的不仅仅是加载 spellcheck 插件以使拼写检查在 TinyMCE 中工作。您实际上有 3 个拼写检查选项:

    1. 依靠浏览器的拼写检查器。这是最简单的选择,因为它只需要您向 TinyMCE 初始化添加一项:https://www.tinymce.com/docs/configure/spelling/#browser_spellcheck
    2. 安装开源服务器端拼写解决方案,并将其连接到您正在加载的 spellchecker 插件。当您加载客户端 spellchecker 插件时,您的配置不会将其连接到任何服务器端拼写服务。 TinyMCE 文档中记录了这方面的基础知识,地址为https://www.tinymce.com/docs/get-started/spell-checking/#phpspellcheckercomponent
    3. 购买商业拼写检查解决方案。 TinyMCE 的创建者提供您可以购买的拼写检查服务 - 它称为 Spell Checker Pro,并作为本地安装和云服务提供。此处记录了基础知识:https://www.tinymce.com/docs/get-started/spell-checking/#tinymcespellcheckerproplugin

    【讨论】:

    • 看起来@Onkarraj 通过设置browser_spellcheck: true 遵循了您的第一个选项。我正在尝试遵循相同的设置,并且在单击拼写检查器图标时收到相同的错误。我在 /js/plugins/spellchecker 资源上收到 404
    • @Stetzon 如果您依赖浏览器进行拼写,则无需加载拼写检查插件。
    【解决方案2】:

    在您的情况下,您同时使用两个选项:

    1. browser_spellcheck:真,
    2. 插件选项下的拼写检查器,为此您需要做更多的工作,为此,您需要点击给定的链接:

    TinyMCE 4.0.5 spell check not working

    谢谢

    【讨论】:

      猜你喜欢
      • 2013-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-24
      • 2012-05-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多