Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with page integrations/rails.md #2938

Open
jamesw opened this issue Oct 12, 2023 · 0 comments
Open

Problem with page integrations/rails.md #2938

jamesw opened this issue Oct 12, 2023 · 0 comments

Comments

@jamesw
Copy link

jamesw commented Oct 12, 2023

Trying to implement self hosted tinymce integration in a rails engine using importmaps and the paths to the subfolders such as plugins are not found, the documentation would be good if it included how to use tinymce with importmaps in Rails 7+ as I am unable to make this work at all.

I have the tinymce.min.js with the sub folder in app/javascripts/my_engine_name/

I have added
pin "ccs_cms/custom_page/tinymce/tinymce.min"
to importmap.rb

I am loading the tinymce.min.js in the head of my layout using
<%= javascript_import_module_tag 'ccs_cms/custom_page/tinymce/tinymce.min' %>

This configuration works in as far as tinymce loads but does not display and the console reports a huge number of 404 errors for themes and plugins folders e.g.

GET
http://localhost:3000/admin_dashboard/page_maintenance/something-new//themes/silver/theme.js
[HTTP/1.1 404 Not Found 59ms]

The documentation needs to describe how to set the paths correctly or how to implement this solution with importmaps in a Rails 7 application, does not have to be in an engine as the same issue is applicable, this may just be an issue with the way the importmap is pinned and maybe a download option should be used and tinymce should be in the vendors folder

affected page: https://www.tiny.cloud/docs/integrations/rails/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant