Jumat, 13 Oktober 2017

Membuat Wysiwyg

1.  Install unisharp/ckeditor
     Perintah di gitbash :composer require unisharp/laravel-ckeditor
2. Masuk ke /config/app.php
    copy paste perintah : Unisharp\Ckeditor\ServiceProvider::class,
    simpan di paling bawah bagian provider
3. Ketikan di terminal: php artisan vendor:publish --tag=ckeditor
4. ketik di create
     <div class='form-group clearfix'>
            {{ Form::label("judul", "Judul", ['class' => 'col-md-2 control-label']) }}
              <div class='col-md-4'>
                {{ Form::text("judul", '',['class' => 'form-control required']) }}
                <span class="error">{{$errors->first('judul')}}</span>
              </div>
       </div>
kemudian dibawah @endsection

 @section('js')
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
    <script>
        CKEDITOR.replace( 'deskripsi' );
    </script>
@endsection

5. ketik di edit. lokasi folder : resources-views-admin-project anda
<div class='form-group clearfix'>
            {{ Form::label("judul", "Judul", ['class' => 'col-md-2 control-label']) }}
              <div class='col-md-4'>
                {{ Form::text("judul", null,['class' => 'form-control required']) }}
                <span class="error">{{$errors->first('judul')}}</span>
              </div>
          </div>
dibawah @endsection

@section('js')
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
    <script>
        CKEDITOR.replace( 'deskripsi' );
    </script>
@endsection

0 komentar:

Posting Komentar

luvne.com resepkuekeringku.com desainrumahnya.com yayasanbabysitterku.com