trix
trix copied to clipboard
Initializing Trix editor through plain JS
I want to use the Trix editor inside of a Vue component, but I really need to be able to initialize Trix in the ready function for that component using JS and not through the <trix-editor> tag.
Is that possible? It was not obvious from the documentation.
Thanks in advance, Adam
Trix is initialized whenever a <trix-editor> is inserted in the DOM. So appending a document.createElement("trix-editor") or any another DOM manipulation of your choosing will work.