AllenDegrud
AllenDegrud

Reputation: 189

Why does not display ckeditor?

I use a standart pack.

There is JS code with a name text:

<script type="text/javascript">
                CKEDITOR.replace( 'text', {
                    toolbar: [
                        { name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates' ] }, // Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
                        [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ],          // Defines toolbar group without name.
                        '/',                                                                                    // Line break - next group will be placed in new line.
                        { name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
                    ]
                });
            </script>

I get error in console Chrome:

Uncaught TypeError: Cannot read property 'options' of undefined 

HTML Code:

<div class="text"><textarea name="text" placeholder="Основной текст..."></textarea></div>

Upvotes: 1

Views: 141

Answers (1)

Wiktor Walc
Wiktor Walc

Reputation: 5560

In the past similar errors were sometime related to missing / broken language file. Clear the browser cache and load CKEditor again. If it does not help check the network tab in your browser and see if the language file is being loaded properly.

Upvotes: 0

Related Questions