如何安装CKeditor 4

时间:2018-07-26 05:43:50

标签: jquery html ckeditor

我从网站上下载了带有插件的CkEditor 4,并完全废弃了文档,但页面空白

我的HTML文件是

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>CKEditor</title>
        <script type="text/javascript" src="jquery-3.3.1.js"></script>
        <script src="ckeditor/ckeditor.js"></script>
    </head>
    <body>
        <textarea name="editor1"></textarea>
        <script>
            CKEDITOR.replace( 'editor1' );
        </script>
    </body>
</html>

我的ckeditor / config.js

CKEDITOR.editorConfig = function( config ) {
    // Define changes to default configuration here.
    // For complete reference see:
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config

    // The toolbar groups arrangement, optimized for a single toolbar row.
    config.toolbarGroups = [
        { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
        { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
        { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
        { name: 'forms' },
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
        { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
        { name: 'links' },
        { name: 'insert' },
        { name: 'styles' },
        { name: 'colors' },
        { name: 'tools' },
        { name: 'others' },
        { name: 'about' }
    ];

    // The default plugins included in the basic setup define some buttons that
    // are not needed in a basic editor. They are removed here.
    config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript';

    // Dialog windows are also simplified.
    config.removeDialogTabs = 'link:advanced';
};

我的html页面为空白;我错过了什么吗?

我的简单页面是: ckeditor

在控制台中,我收到此错误:

Uncaught TypeError: Cannot read property 'langEntries' of null
    at CKEDITOR.resourceManager.CKEDITOR.plugins.setLang (ckeditor.js:265)
    at ckeditor.js:873
    at ckeditor.js:873
    at ckeditor.js:1010
ckeditor.js:526 Uncaught TypeError: Cannot read property 'split' of undefined
    at Object.loadPart (ckeditor.js:526)
    at n (ckeditor.js:275)
    at a.<anonymous> (ckeditor.js:274)
    at a.n (ckeditor.js:10)
    at a.CKEDITOR.event.CKEDITOR.event.fire (ckeditor.js:12)
    at a.CKEDITOR.editor.CKEDITOR.editor.fire (ckeditor.js:13)
    at a.fireOnce (ckeditor.js:12)
    at a.CKEDITOR.editor.CKEDITOR.editor.fireOnce (ckeditor.js:13)
    at k (ckeditor.js:272)
    at Object.<anonymous> (ckeditor.js:272)

0 个答案:

没有答案