问题
I want to save some data from a webpage and for that i wanted to use CKEditor in my page. But after loading the page it's showing normal textarea instead of showing CKEditor . i followed the following process to use it:
1 Download the ckeditor.zip file, uncompressed it and placed it in public > js folder
2.then in my master page in HEAD tag i have used the following line to link it:
<script type="text/javascript" src="{{ URL::asset('assets/js/ckeditor/ckeditor.js') }}"></script`>
3 after that in my viewpage i have used :
<textarea class="form-control" id="article-ckeditor" name="description" rows="3"></textarea></br>
<script>
CKEDITOR.replace( 'article-ckeditor' );
</script>
回答1:
you try to cdn link to i have solve this problem in cdn link..
<textarea name="editor1"></textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
回答2:
Remove the assets and use as following
src="{{ URL::asset('js/ckeditor/ckeditor.js') }}"
回答3:
Try this if you have ckeditor locally on your project
<script src="../vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
回答4:
In my case the solution is:
{{URL::asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')}}
Return path is:
src="http://example.com/someapp/vendor/unisharp/laravel-ckeditor/ckeditor.js"
来源:https://stackoverflow.com/questions/35884400/ckeditor-doesnt-show-in-laravel-5