Raw HTML output from Laravel

I have a form containing textarea that stores user input in a table.

Currently, when I extract this data in my opinion, {{ $data->textarea }} prints <strong> as &lt;strong&gt; . I would like to use or create a very simple WYSIWYG editor, but I don’t think it will work if I cannot output raw HTML.

Is there some kind of attribute that I need to define in my view or controller?


Meta: would it be wiser to create a system like Stack Exchange or Reddit, where **this is bold text** ?

+5
source share
1 answer

I assume that you are using the latest version of Laravel 5, because by default it eludes everything. If so, you need to use one bracket and two exclamation points in tell Blade so that it does not escape this . This should do what you need:

 {!! $data->textarea !!} 
+7
source

All Articles