Its quite simple to add Ckeditor to any laravel application. Its a javascript library so it doesn’t matter which laravel version you are using.
Steps to follow
- Visit Ckeditor Website – https://ckeditor.com/ckeditor-4/download/
- Download full package (without Easy Image)
- Extract download zip forlder and paste ckeditor folder in your laravel public folder
- Now Simply Include ckeditor js file in your header via following code. <script type=”text/javascript” src=”{{asset(‘ckeditor/ckeditor.js’)}}”></script>
- Last step is to initialize ckeditor on a textarea. Full Code mentioned below.
<script type="text/javascript" src="{{asset('ckeditor/ckeditor.js')}}"></script>
<!-- Replacing any textarea with CKEDITOR via below code -->
<script>
// Replace the <textarea id="description"> with a CKEditor 4
// instance, using default configuration.
CKEDITOR.replace('description');
CKEDITOR.replace('notes');
</script>