javascriptjqueryredactor

Clear out Redactor WYSIWYG


We have a redactor editor which we populate from the database but once we have submitted the data back we need to clear the textarea.

We have tried various combinations but are unable to clear it out.

jQuery("#redactor").redactor('set', '');

AND

jQuery("#redactor").val("");

Solution

  • $("#redactor").redactor('code.set', ''); 
    

    updated version