How I can clear the value in the basecamp trix editor?
I am working with basecamp trix editor, after posting value using ajax request, i am unable to clear the value of trix editor, What i want is, I want to clear editor value, any help appreciated:)
Just add this code after your ajax success -

var element = document.querySelector("trix-editor");
element.editor.setSelectedRange([0, element.editor.getDocument().getLength()]);
element.editor.deleteInDirection("backward");
Write
×