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 715107e commit fbcf53b
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 6. Please see the [`main`](https://github.com/spohlenz/tinymce-rails) branch for TinyMCE 7, and alternate branches for [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 @@ -57,7 +57,7 @@ See the [TinyMCE 6 Documentation](https://www.tiny.cloud/docs/tinymce/6/) 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 @@ -66,10 +66,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 fbcf53b

Please sign in to comment.