I have got a text area having id ="myTextArea", I'm able to fetch the content of text area but I'm not able to clear the content once the user successfully submits the data. I'm using a wysihtml5 plugin as my text editor. my code is as follows.
<textarea name="def_text" id="myTextArea" class="textarea"></textarea>
in my jquery file, I'm doing as follows once the user successfully submits the data.
$('#myTextArea').val('');
but it is not clearing the text area. I've tried $('#myTextArea').html('') too , but it is not working for me.
Solution:
Try using the following line that worked for me.
$('#myTextArea').data("wysihtml5").editor.clear();


