I'm trying to use a WYSIWYG editor in my Laravel application but I have a bug I can't solve.
What works:
- A form that sends a post request with a text area filled (name = pitch)
- So the request is well formed and I can retrieve it in my controller, everything is perfect
My Problem
When I add a WYSIWYG editor on this specific textarea (with Trumbowyg or Redactor, I tried both), then pitch
disappears from the request and I can't get it on the controller.
I don't have any JS issue in the console, when I delete the call to the WYSIWYG editor, everything is fine, so I don't know where to search.
DB field for pitch
is text
(I tried switching it to string
, but didn't work either).
Here is my view code:
<tr>
<td>{!! Form::label('pitch', 'Pitch') !!}</td>
<td>{!! Form::textarea('pitch','',array('class' => 'pitch')) !!}</td>
</tr>
<script type="text/javascript">
$(function()
{
$('#pitch').trumbowyg({
resetCss: true
});
});
</script>
And in the Controller, this code gives me null
dd($request->input('pitch'));