spohlenz/tinymce-rails

Rails 7 with Importmaps - TinyMCERails is not defined

phil-6 opened this issue · 5 comments

phil-6 commented

We have tried a LOT of options to try and get the tinymce-rails gem working with Rails 7 and Importmaps, almost every approach leads to Uncaught ReferenceError: TinyMCERails is not defined from wherever we call <%= tinymce %>

The approaches we have tried:

  1. As per the documentation: Install Gem, tinymce_assets helper in application head etc.
  2. Not using the asset helper, and adding import "tinymce" to our application.js
  3. Importing tinymce js from every conceivable location (including the root gem path) and then as above.

Working app with tinyMCE on Rails 7 and importmap rails_tinyMCE

phil-6 commented

Working app with tinyMCE on Rails 7 and importmap rails_tinyMCE

That was really helpful, that has helped scope the issue to Propshaft.

I'll close this as a duplicate of #303

Working app with tinyMCE on Rails 7 and importmap rails_tinyMCE

That was really helpful, that has helped scope the issue to Propshaft.

I'll close this as a duplicate of #303

Hey @phil-6 Did you get this working with Propshaft? What solution did you find?

@latecia94 no, sadly not. We moved to use EditorJS instead as we felt it was a better all-round solution

Propshaft has been added in #315. If you are able to test it out and share your experience, that would be great.