I am building a simple blog but I would like to use the CKeditor for the blog message so users can style the blog message a little bit. I have never used CKeditor before and I am a bit new to Laravel also. So I managed to turn my textarea in a CKeditor field and I also build a function to store the blog posts. Thats not a problem, I see data in my database and also at my blog overview page.
But, CKeditor/Laravel will obviously store the tags, that are generated by CKeditor, in the database and will display them as just text. How can I display the text just like code?
Blog message now:
CKeditor
My code
Form
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label for="bericht">Nieuwsbericht <span class="required">*</span></label>
<textarea class="form-control" id="bericht" name="bericht" required></textarea>
</div>
</div>
</div>
<script type="text/javascript">
CKEDITOR.replace( 'bericht' );
</script>
Display a blog post
<div class="blog-post">
<div class="row">
<div class="col-md-12">
<h1>{{ $blog->name }}</h1>
</div>
<div class="col-md-12">
<h3>{{ $blog->subtitel }}</h3>
</div>
<div class="col-md-12">
<p class="date">{{ $blog->created_at->formatLocalized('%A %d %B %Y') }}, Door {{$blog->user->name}}</p>
</div>
<div class="col-md-12">
<p class="blog-message">
{{ $blog->bericht }}
</p>
</div>
</div>
</div>

