trix icon indicating copy to clipboard operation
trix copied to clipboard

Initializing Trix editor through plain JS

Open adamthebig opened this issue 10 years ago • 1 comments

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

adamthebig avatar Apr 06 '16 22:04 adamthebig

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.

javan avatar Apr 07 '16 14:04 javan