spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
813 stars 256 forks source link

Rails 7 with Importmaps - TinyMCERails is not defined #306

Closed phil-6 closed 11 months ago

phil-6 commented 11 months ago

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.
sergey-arkhipov commented 11 months ago

Working app with tinyMCE on Rails 7 and importmap rails_tinyMCE

phil-6 commented 11 months ago

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

latecia94 commented 4 months ago

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?

phil-6 commented 4 months ago

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