[ActionText] Javascript helper equivalent of rich_text_area_tag

Since some of my views are rendered in Javascript, specifically with React, I’d like a way to attach the Trix editor and ActionText capabilities to a dom node directly.

The rich_text_area_tag doesn’t look very complicated but uses a couple of things that I don’t think are available through JS:

  • ActionText::TagHelper.id

  • main_app.rails_direct_uploads_url

  • main_app.rails_service_blob_url(":signed_id", ":filename")


Would this be something the npm package could include? And is there a way to get rails_direct_uploads_url and rails_service_blob_url in the npm package?