Using CKEditor inside blade template [Laravel 3.x]

后端 未结 2 2021
悲哀的现实
悲哀的现实 2021-01-27 22:30

I\'d like to use this bundle: laravel-ckeditor but I have troubles in nesting it in my view (all previous installation steps I\'ve done successfully). How can i connect Form::te

2条回答
  •  滥情空心
    2021-01-27 23:07

    steps are:

    1. install the editor first via composer by running the command:

      composer require unisharp/laravel-ckeditor

    2. Add this to ServiceProvider in config/app.php to the providers array: 'providers' => [

      Unisharp\Ckeditor\ServiceProvider::class,

    3. back at the command line again, Publish the resources:

      php artisan vendor:publish --tag=ckeditor

    4. Now to embed it into a textarea bind them with an id

    
    
    
    
    

    for these steps they had their own github repository



    NOTE: if you are using Laravel Collictive to add the textarea and bind the id to it use this:

    {{Form::textarea('desc', '', ['id' => 'your_id'])}}
    

    AND then display the nice formatted content like this:

    {!!$post->desc!!}
    

    where $post->desc is the returned stored value from the database

提交回复
热议问题