CKeditor return “CKEditor is not defined” in Laravel
up vote
0
down vote
favorite
When integrating CKeditor in Laravel. It returns error:
GET http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js net::ERR_ABORTED 404 (Not Found)
Uncaught ReferenceError: CKEditor is not defined
at add:88
This is my code:
<script src="vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
<textarea id="editor1" ></textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
There are questions with the same problem, but none helped me
javascript php laravel ckeditor
add a comment |
up vote
0
down vote
favorite
When integrating CKeditor in Laravel. It returns error:
GET http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js net::ERR_ABORTED 404 (Not Found)
Uncaught ReferenceError: CKEditor is not defined
at add:88
This is my code:
<script src="vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
<textarea id="editor1" ></textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
There are questions with the same problem, but none helped me
javascript php laravel ckeditor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
When integrating CKeditor in Laravel. It returns error:
GET http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js net::ERR_ABORTED 404 (Not Found)
Uncaught ReferenceError: CKEditor is not defined
at add:88
This is my code:
<script src="vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
<textarea id="editor1" ></textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
There are questions with the same problem, but none helped me
javascript php laravel ckeditor
When integrating CKeditor in Laravel. It returns error:
GET http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js net::ERR_ABORTED 404 (Not Found)
Uncaught ReferenceError: CKEditor is not defined
at add:88
This is my code:
<script src="vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
<textarea id="editor1" ></textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
There are questions with the same problem, but none helped me
javascript php laravel ckeditor
javascript php laravel ckeditor
edited Nov 11 at 11:25
Mehran
11429
11429
asked Nov 11 at 7:48
Ismoilov Amir
85
85
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
You must first publish vendor with:
php artisan vendor:publish --tag=ckeditor
And then use the asset helper function to address the script file:
<script src="asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')"></script>
or
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
This happened because You forgot to add a forward slash before referencing the js file. this way browser addresses it from where your page currently at. so use slash before the address or use the asset helper function
This should print out this:
http://127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js (correct)
Instead of this:
http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js (wrong)
Salar Bahador, i edit it how you suggested. But i take the same error with print: 127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js
– Ismoilov Amir
Nov 11 at 9:05
did you publish the vendor? @IsmoilovAmir
– Salar Bahador
Nov 11 at 9:18
Salar Bahador, i did it. Publishing complete
– Ismoilov Amir
Nov 11 at 9:21
@IsmoilovAmir is vendor directory created in public directory?
– Salar Bahador
Nov 11 at 9:25
Salar Bahador, yes i have directory vendor in public directory. But there no ckeditor's data. All data of ckeditor are located in root/vendor/unisharp
– Ismoilov Amir
Nov 11 at 9:30
|
show 4 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You must first publish vendor with:
php artisan vendor:publish --tag=ckeditor
And then use the asset helper function to address the script file:
<script src="asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')"></script>
or
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
This happened because You forgot to add a forward slash before referencing the js file. this way browser addresses it from where your page currently at. so use slash before the address or use the asset helper function
This should print out this:
http://127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js (correct)
Instead of this:
http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js (wrong)
Salar Bahador, i edit it how you suggested. But i take the same error with print: 127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js
– Ismoilov Amir
Nov 11 at 9:05
did you publish the vendor? @IsmoilovAmir
– Salar Bahador
Nov 11 at 9:18
Salar Bahador, i did it. Publishing complete
– Ismoilov Amir
Nov 11 at 9:21
@IsmoilovAmir is vendor directory created in public directory?
– Salar Bahador
Nov 11 at 9:25
Salar Bahador, yes i have directory vendor in public directory. But there no ckeditor's data. All data of ckeditor are located in root/vendor/unisharp
– Ismoilov Amir
Nov 11 at 9:30
|
show 4 more comments
up vote
0
down vote
You must first publish vendor with:
php artisan vendor:publish --tag=ckeditor
And then use the asset helper function to address the script file:
<script src="asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')"></script>
or
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
This happened because You forgot to add a forward slash before referencing the js file. this way browser addresses it from where your page currently at. so use slash before the address or use the asset helper function
This should print out this:
http://127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js (correct)
Instead of this:
http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js (wrong)
Salar Bahador, i edit it how you suggested. But i take the same error with print: 127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js
– Ismoilov Amir
Nov 11 at 9:05
did you publish the vendor? @IsmoilovAmir
– Salar Bahador
Nov 11 at 9:18
Salar Bahador, i did it. Publishing complete
– Ismoilov Amir
Nov 11 at 9:21
@IsmoilovAmir is vendor directory created in public directory?
– Salar Bahador
Nov 11 at 9:25
Salar Bahador, yes i have directory vendor in public directory. But there no ckeditor's data. All data of ckeditor are located in root/vendor/unisharp
– Ismoilov Amir
Nov 11 at 9:30
|
show 4 more comments
up vote
0
down vote
up vote
0
down vote
You must first publish vendor with:
php artisan vendor:publish --tag=ckeditor
And then use the asset helper function to address the script file:
<script src="asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')"></script>
or
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
This happened because You forgot to add a forward slash before referencing the js file. this way browser addresses it from where your page currently at. so use slash before the address or use the asset helper function
This should print out this:
http://127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js (correct)
Instead of this:
http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js (wrong)
You must first publish vendor with:
php artisan vendor:publish --tag=ckeditor
And then use the asset helper function to address the script file:
<script src="asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')"></script>
or
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
This happened because You forgot to add a forward slash before referencing the js file. this way browser addresses it from where your page currently at. so use slash before the address or use the asset helper function
This should print out this:
http://127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js (correct)
Instead of this:
http://127.0.0.1:8000/control/post/vendor/unisharp/laravel-ckeditor/ckeditor.js (wrong)
edited Nov 11 at 9:29
answered Nov 11 at 8:18
Salar Bahador
4251313
4251313
Salar Bahador, i edit it how you suggested. But i take the same error with print: 127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js
– Ismoilov Amir
Nov 11 at 9:05
did you publish the vendor? @IsmoilovAmir
– Salar Bahador
Nov 11 at 9:18
Salar Bahador, i did it. Publishing complete
– Ismoilov Amir
Nov 11 at 9:21
@IsmoilovAmir is vendor directory created in public directory?
– Salar Bahador
Nov 11 at 9:25
Salar Bahador, yes i have directory vendor in public directory. But there no ckeditor's data. All data of ckeditor are located in root/vendor/unisharp
– Ismoilov Amir
Nov 11 at 9:30
|
show 4 more comments
Salar Bahador, i edit it how you suggested. But i take the same error with print: 127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js
– Ismoilov Amir
Nov 11 at 9:05
did you publish the vendor? @IsmoilovAmir
– Salar Bahador
Nov 11 at 9:18
Salar Bahador, i did it. Publishing complete
– Ismoilov Amir
Nov 11 at 9:21
@IsmoilovAmir is vendor directory created in public directory?
– Salar Bahador
Nov 11 at 9:25
Salar Bahador, yes i have directory vendor in public directory. But there no ckeditor's data. All data of ckeditor are located in root/vendor/unisharp
– Ismoilov Amir
Nov 11 at 9:30
Salar Bahador, i edit it how you suggested. But i take the same error with print: 127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js
– Ismoilov Amir
Nov 11 at 9:05
Salar Bahador, i edit it how you suggested. But i take the same error with print: 127.0.0.1:8000/vendor/unisharp/laravel-ckeditor/ckeditor.js
– Ismoilov Amir
Nov 11 at 9:05
did you publish the vendor? @IsmoilovAmir
– Salar Bahador
Nov 11 at 9:18
did you publish the vendor? @IsmoilovAmir
– Salar Bahador
Nov 11 at 9:18
Salar Bahador, i did it. Publishing complete
– Ismoilov Amir
Nov 11 at 9:21
Salar Bahador, i did it. Publishing complete
– Ismoilov Amir
Nov 11 at 9:21
@IsmoilovAmir is vendor directory created in public directory?
– Salar Bahador
Nov 11 at 9:25
@IsmoilovAmir is vendor directory created in public directory?
– Salar Bahador
Nov 11 at 9:25
Salar Bahador, yes i have directory vendor in public directory. But there no ckeditor's data. All data of ckeditor are located in root/vendor/unisharp
– Ismoilov Amir
Nov 11 at 9:30
Salar Bahador, yes i have directory vendor in public directory. But there no ckeditor's data. All data of ckeditor are located in root/vendor/unisharp
– Ismoilov Amir
Nov 11 at 9:30
|
show 4 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246804%2fckeditor-return-ckeditor-is-not-defined-in-laravel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown