F
F
fomenko_alexandr2017-06-03 00:09:40
CKEditor
fomenko_alexandr, 2017-06-03 00:09:40

Why doesn't ckeditor work?

Hello masters.
I am a complete noob in js, I want to install CKEditor. In the head I connected ckeditor.js,
created a form with the name and id (to be sure) "editor"
registered below

<script>
    CKEDITOR.replace("editor")
</script>

But I get an error:
Uncaught TypeError: Cannot read property 'unselectable' of null
at b (ckeditor.js:347) ... etc.
Tell me please, what could be the problem?
PS jquery connected

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mokhirjon Naimov, 2017-06-03
@zvermafia

Try replacing withCKEDITOR.replace("#editor")

H
hakkol, 2017-06-03
@hakkol

What version of ckeditor are you using? Your best bet is to use this one - https://github.com/UniSharp/laravel-ckeditor . After the command, php artisan vendor:publish --tag=ckeditorall files will be in the public folder. If you use the assembler, then I added the config file and connected it after ckeditor

var CKEDITOR_BASEPATH = '/vendor/unisharp/laravel-ckeditor/';
(looks in the public folder and finds '/vendor/unisharp/laravel-ckeditor/' there). Well, if you use jquery, then include ckeditor.js and adapters/jquery.js.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question