I have a form
containing a textarea
that stores user input in a table.
Currently when I pull this data in my view, {{ $data->textarea }}
it outputs <strong>
as <strong>
. I'd like to either use or build a very basic WYSIWYG editor, but I don't think it will work if I can't output the raw HTML.
Is there some sort of attribute I need to define in my view or controller?
Meta: Would it be wiser to create a system like the Stack Exchange or Reddit where **this is bold text**
?
I'm assumng you're using the latest version of Laravel 5 because it escapes everything by default. If so then you need to use one brace and two exclamation marks to tell Blade not to escape it. This should do what you need:
{!! $data->textarea !!}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With