How To Use And Implement Ckeditor Using Laravel 5.8

admin_img Posted By Bajarangi soft , Posted On 22-01-2021

Learn how to use and install ckeditor using laravel

how-to-install-ckeditor-using-laravel

Step 1:Create index.blade.php and implement below html code in it.

<div class="form-group col-sm-12">
    <label>Description</label>
    <textarea class="ckeditor form-control" name="description"></textarea>
</div>

Step 2:Add script for Implementing Editor
<script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>

<script type="text/javascript">
    $(document).ready(function() {
        $('.ckeditor').ckeditor();
    });
</script>

Complete Code For Implementing Editor.
@extends('layouts.app')
@section('content')
 <div class="content">
        <div class="box box-primary">
            <div class="box-body">
                <div class="clearfix"></div>
                <div class="row">
                    <form method="post" action="">
                        @csrf                   
                        <div class="form-group col-sm-12">
                            <label>Content</label>
                            <textarea class="ckeditor form-control" name="description"</textarea>
                        </div>
                        <div class="form-group col-sm-12">
                            {!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

<script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>
 <script type="text/javascript">
    $(document).ready(function() {
       $('.ckeditor').ckeditor();
    });
</script>
@endsection

Related Post