CKEditor doesn't show in laravel 5

二次信任 提交于 2019-12-14 04:11:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!