Skip to content

Commit

Permalink
Update README to refer to Propshaft support
Browse files Browse the repository at this point in the history
  • Loading branch information
spohlenz committed Jul 10, 2024
1 parent f18f7a6 commit 6176d34
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Rails Integration for TinyMCE

The `tinymce-rails` gem integrates the [TinyMCE](https://www.tiny.cloud/) editor with the Rails asset pipeline.

This gem is compatible with Rails 5.0 and higher.
This gem is compatible with Rails 5.1 and higher.

This is the branch for **TinyMCE 7**.<br />
Please see alternate branches for [TinyMCE 6](https://github.com/spohlenz/tinymce-rails/tree/tinymce-6), [TinyMCE 5](https://github.com/spohlenz/tinymce-rails/tree/tinymce-5), [TinyMCE 4](https://github.com/spohlenz/tinymce-rails/tree/tinymce-4) & [TinyMCE 3.5.x](https://github.com/spohlenz/tinymce-rails/tree/tinymce-3).
Expand Down Expand Up @@ -61,7 +61,7 @@ See the [TinyMCE 7 Documentation](https://www.tiny.cloud/docs/tinymce/7/) for a
Use *one* of the following options to include TinyMCE assets.
(1) Add to your application.js:
(1) Add to your application.js (Sprockets only):
```js
//= require tinymce
Expand All @@ -70,10 +70,14 @@ Use *one* of the following options to include TinyMCE assets.
or (2) add the script tag to your layout using the `tinymce_assets` helper:

```erb
<%= tinymce_assets %>
#=> <script type="text/javascript" src="/assets/tinymce.js">
<%= tinymce_assets data: { turbo_track: "reload" } %>
#=> <script type="text/javascript" src="/assets/tinymce.js" data-turbo-track="reload">
```

When using Propshaft, the `tinymce_assets` helper adds multiple script tags including the pre-init code (available via the `tinymce_preinit` helper), as well as `tinymce/tinymce.js` and `tinymce/rails.js`. You may prefer to selectively include these manually depending on your requirements.

For Sprockets, these are bundled together into one script tag.


**4. Initialize TinyMCE**

Expand Down

0 comments on commit 6176d34

Please sign in to comment.