I am making a discussion forum application in Laravel . Here I want to use Ckeditor in comment sections. When somebody comments, then the code should show like here in stackoverflow.
@if(Auth::check()!=null)
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-default">
<div class="panel panel-body">
<form action="/comment" method="POST">
{{ csrf_field() }}
<input type="hidden" name="user_id" value="{{ Auth::user()->id }}">
<input type="hidden" name="post_id" value="{{ $post->id }}">
<div class="form-group">
<label for="comment">Reply</label>
<textarea name="body" class="form-control" style="size: 200px"></textarea>
</div>
<input type="submit" name="com" id="com" class="btn btn-xs btn-success pull-right">
</form>
</div>
</div>
</div>
@endif
Please give me very simple steps to use ckeditor. My master file is layout.app and this file is comment.blade.php. Please guide me where I should enter what files and scripts files.
You can use laravel CKEditor Package;
How to install: Set up package
Add ServiceProvider
Edit
config/app.php
, add the following file toApplication Service Providers
section.Publish the resources
Usage Default way (initiate by name or id) :
Or if you want to initiate by jQuery selector :
github link for more
Example:
and i have provided editor id