user3810794
user3810794

Reputation: 273

Html tags showing after ckeditor

Im using ckeditor CDN in my laravel project.I've got the editor to show up on the text area but after I submit the form,texts from the textarea displays along with html tags. Am i missing anything?

<head>
   <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
         <script src="//cdn.ckeditor.com/4.5.6/standard/ckeditor.js"></script>
    <title>project title </title>
  </head>

Form view:

<div class="form-goup">
{!!Form::label('details','details')!!}
{!!Form::textarea('details',null,['class'=>'form-control'])!!}

<script>
        ckeditor.replace( 'details' );
    </script>

show view:

{{$pages->details}}

output: output

Upvotes: 6

Views: 11690

Answers (3)

Jignesh Joisar
Jignesh Joisar

Reputation: 15125

In laravel 9 needs to use html_entity_decode method

{!!  html_entity_decode($description) !!}

in Older Version

{!!  $description !!}

Upvotes: 1

Murad
Murad

Reputation: 1162

This will display content with out html tags.

Use {!!$pages->details!!}

Upvotes: 2

lagbox
lagbox

Reputation: 50491

The {{ }} syntax will escape the data with htmlentities.

For unescaped you can use {!! !!}

Laravel Docs - Blade - Displaying Data

Upvotes: 16

Related Questions