未找到tinymce拼写检查

时间:2016-08-09 13:40:40

标签: javascript cakephp tinymce

我已经在cakephp中成功实施了TinyMCE,现在我想添加spellchecker,但它会给我404 not found error。以下是我使用的代码。

tinymce.init({
    selector: "textarea.richtext",
    theme: "modern",
    width: 600,
    height: 250,
    plugins: [
        "advlist autolink link image lists charmap hr anchor pagebreak",
        "searchreplace wordcount visualblocks visualchars fullscreen insertdatetime media nonbreaking",
        "save table contextmenu directionality emoticons template paste textcolor code spellchecker"
    ],
    spellchecker_rpc_url: 'spellchecker.php',
    browser_spellcheck : true,
    content_css: "css/content.css",
    toolbar: "insertfile undo redo | styleselect | spellchecker | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | preview media fullpage | forecolor backcolor emoticons | code",
    style_formats: [
        {title: 'Bold text', inline: 'b'},
        {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
        {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
        {title: 'Example 1', inline: 'span', classes: 'example1'},
        {title: 'Example 2', inline: 'span', classes: 'example2'},
        {title: 'Table styles'},
        {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
    ]
});

错误是

enter image description here

1 个答案:

答案 0 :(得分:0)

TinyMCE没有附带拼写检查引擎 - 这是您需要在服务器上安装的内容,如下所示:

https://www.tinymce.com/docs/get-started/spell-checking/

你可以依靠......

  • 浏览器的拼写检查
  • 开源服务器端拼写检查
  • 商业服务器端拼写检查

这些选项都在上面引用的页面上进行了审核。

您的错误显示您正在使用CDN运行TinyMCE但该实例不会安装拼写检查服务器端代码,因此您的错误。您确实可以运行TinyMCE的CDN副本,只需在服务器上安装拼写内容并正确设置spellchecker_rpc_url