hi 馃憢 ,
I am using trix in a form where I want to "clear" the editor contents after the form submits. I am not seeing a clear way from the API how to do this. The best I have come up with is something like:
editor.setSelectedRange([0, editor.getDocument().getLength()]);
editor.deleteInDirection('forward');
but this doesn't actually delete the text in the document, though it resets the cursor position.
Figured it out:
editor.loadHTML('')
does the trick 馃憤
Most helpful comment
Figured it out:
does the trick 馃憤