How to insert a HTML code in CKEditor dynamically using laravel?

Viewed 42

My View File

<div id="editor">
@foreach ($templates as $template)
    {{ stripcslashes($template->template) }}
@endforeach
</div>
<script>
   CKEDITOR.replace( 'editor' );
</script>

My Controller

public function index(){
     $templates = Template::all();
     return view('home', compact('templates'));
}

Output is not getting formatted as html code

0 Answers
Related