tinymce-rails 6.1.0 → 7.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -11
  3. data/app/assets/source/tinymce/tinymce.js +10358 -7311
  4. data/lib/tinymce/rails/asset_installer/copy_no_preserve.rb +1 -1
  5. data/lib/tinymce/rails/asset_installer.rb +4 -4
  6. data/lib/tinymce/rails/asset_manifest/json_manifest.rb +62 -0
  7. data/lib/tinymce/rails/asset_manifest/null_manifest.rb +12 -0
  8. data/lib/tinymce/rails/asset_manifest/propshaft_manifest.rb +43 -0
  9. data/lib/tinymce/rails/asset_manifest/yaml_manifest.rb +43 -0
  10. data/lib/tinymce/rails/asset_manifest.rb +7 -104
  11. data/lib/tinymce/rails/configuration.rb +6 -1
  12. data/lib/tinymce/rails/configuration_file.rb +2 -1
  13. data/lib/tinymce/rails/engine.rb +15 -2
  14. data/lib/tinymce/rails/helper.rb +19 -5
  15. data/lib/tinymce/rails/propshaft/asset.rb +11 -0
  16. data/lib/tinymce/rails/version.rb +2 -2
  17. data/lib/tinymce/rails.rb +2 -2
  18. data/vendor/assets/javascripts/tinymce/icons/default/icons.js +1 -1
  19. data/vendor/assets/javascripts/tinymce/langs/readme.md +3 -0
  20. data/vendor/assets/javascripts/tinymce/license.md +6 -0
  21. data/vendor/assets/javascripts/tinymce/models/dom/model.js +2 -2
  22. data/vendor/assets/javascripts/tinymce/plugins/accordion/plugin.js +4 -0
  23. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +2 -2
  24. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +2 -2
  25. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +2 -2
  26. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +2 -2
  27. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +2 -2
  28. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +2 -2
  29. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
  30. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +2 -2
  31. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +2 -2
  32. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +2 -2
  33. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +2 -2
  34. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/ar.js +93 -0
  35. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +93 -0
  36. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/ca.js +93 -0
  37. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/cs.js +93 -0
  38. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/da.js +93 -0
  39. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/de.js +93 -0
  40. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/el.js +93 -0
  41. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/en.js +93 -0
  42. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/es.js +93 -0
  43. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/eu.js +93 -0
  44. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/fa.js +93 -0
  45. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/fi.js +93 -0
  46. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +93 -0
  47. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/he_IL.js +93 -0
  48. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/hi.js +93 -0
  49. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/hr.js +93 -0
  50. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +93 -0
  51. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/id.js +93 -0
  52. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/it.js +93 -0
  53. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/ja.js +93 -0
  54. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/kk.js +93 -0
  55. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +93 -0
  56. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/ms.js +93 -0
  57. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +93 -0
  58. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/nl.js +93 -0
  59. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/pl.js +93 -0
  60. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +93 -0
  61. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +93 -0
  62. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/ro.js +93 -0
  63. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/ru.js +93 -0
  64. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/sk.js +93 -0
  65. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +93 -0
  66. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +93 -0
  67. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/th_TH.js +93 -0
  68. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/tr.js +93 -0
  69. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/uk.js +93 -0
  70. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/vi.js +93 -0
  71. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +87 -0
  72. data/vendor/assets/javascripts/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +93 -0
  73. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +2 -2
  74. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +2 -2
  75. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +2 -2
  76. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +2 -2
  77. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +2 -2
  78. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +2 -2
  79. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +2 -2
  80. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +2 -2
  81. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +2 -2
  82. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +2 -2
  83. data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +2 -2
  84. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +2 -2
  85. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +2 -2
  86. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +2 -2
  87. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +2 -2
  88. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +2 -2
  89. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +2 -2
  90. data/vendor/assets/javascripts/tinymce/skins/content/dark/content.js +1 -0
  91. data/vendor/assets/javascripts/tinymce/skins/content/default/content.js +1 -0
  92. data/vendor/assets/javascripts/tinymce/skins/content/document/content.js +1 -0
  93. data/vendor/assets/javascripts/tinymce/skins/content/tinymce-5/content.js +1 -0
  94. data/vendor/assets/javascripts/tinymce/skins/content/tinymce-5-dark/content.js +1 -0
  95. data/vendor/assets/javascripts/tinymce/skins/content/writer/content.js +1 -0
  96. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.css +1 -1
  97. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.css +1 -1
  98. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.js +1 -0
  99. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
  100. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.js +1 -0
  101. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +1 -1
  102. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +1 -1
  103. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.js +1 -0
  104. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -1
  105. data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -0
  106. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.css +1 -1
  107. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.css +1 -1
  108. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.js +1 -0
  109. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
  110. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.js +1 -0
  111. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
  112. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +1 -1
  113. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.js +1 -0
  114. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
  115. data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -0
  116. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.css +1 -1
  117. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.css +1 -1
  118. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.js +1 -0
  119. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
  120. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.js +1 -0
  121. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
  122. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.css +1 -1
  123. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.js +1 -0
  124. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
  125. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +1 -0
  126. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.css +1 -1
  127. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.css +1 -1
  128. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -0
  129. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
  130. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.js +1 -0
  131. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
  132. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.css +1 -1
  133. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -0
  134. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  135. data/vendor/assets/javascripts/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -0
  136. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +384 -2
  137. data/vendor/assets/javascripts/tinymce/tinymce.d.ts +934 -516
  138. data/vendor/assets/javascripts/tinymce/tinymce.js +383 -2
  139. metadata +75 -10
  140. data/LICENSE +0 -19
  141. data/vendor/assets/javascripts/tinymce/langs/README.md +0 -3
  142. data/vendor/assets/javascripts/tinymce/license.txt +0 -21
  143. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +0 -4
  144. /data/app/assets/{javascripts → sprockets}/tinymce/preinit.js.erb +0 -0
  145. /data/app/assets/{javascripts → sprockets}/tinymce.js +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e5616bd4ae252319c2980791ffd7215d68f6baa91a8130d023ae88c0248af28
4
- data.tar.gz: b4d0dfe88f2382836c0fdf1fad5590a3d0c053f29b20ce7fbd41dc64c92b93c3
3
+ metadata.gz: e9954f215a877a5b7ee797b89e8c54bfd2f054c97e2ed00a92167e9684b41808
4
+ data.tar.gz: 711f852072c7753df962ea2087696847fb0fa4a9ba8eb6bf39d8314a91b2aff6
5
5
  SHA512:
6
- metadata.gz: c780f724b655b6a1f1ddaec0fb8ee4884515d98a10a23190f6995fa0879d70678800071fda4d00f01bc270fdf23589c5ca17ca620045d5308855a97e3126ed8a
7
- data.tar.gz: 70c1066af735c2211362ff75a7fcf13ad58a071e2f2d387433c466d9f28bc44c66f9a997c3554336cc3ce7d2c8fbe7484c2be1a737c2b957e2426b08fa23982f
6
+ metadata.gz: c947285fd4b4f855a0481c78c2740ccc960df44111bbaf3a31ab72e01787cc5174cbf9ec3c9f7129bfee3417474d82a65ed90900035ac6dbabb9444321e82290
7
+ data.tar.gz: 50433cdc1ef46826b700edee09d8f708f798309a421ef864644f95d2ebc06c0fcfa0b6d269621bc38f76791cab01b976ae35014431b7d797459a7a6320eb7d9f
data/README.md CHANGED
@@ -3,11 +3,17 @@ Rails Integration for TinyMCE
3
3
 
4
4
  The `tinymce-rails` gem integrates the [TinyMCE](https://www.tiny.cloud/) editor with the Rails asset pipeline.
5
5
 
6
- This gem is compatible with Rails 4.2 and higher.
6
+ This gem is compatible with Rails 5.1 and higher.
7
7
 
8
- This is the branch for TinyMCE 6. Please see 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).
8
+ This is the branch for **TinyMCE 7**.<br />
9
+ 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).
9
10
 
10
- [![Build Status](https://travis-ci.org/spohlenz/tinymce-rails.svg?branch=main)](https://travis-ci.org/spohlenz/tinymce-rails)
11
+ > [!IMPORTANT]
12
+ > Please note that as of version 7, TinyMCE (and therefore this project) is now licensed under the GPL.
13
+
14
+ [![Latest Gem Version](https://img.shields.io/gem/v/tinymce-rails)](https://rubygems.org/gems/tinymce-rails)
15
+ [![Upstream Version](https://img.shields.io/npm/v/tinymce?label=upstream&color=%23335dff)](https://www.tiny.cloud/docs/tinymce/latest/release-notes/)
16
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/spohlenz/tinymce-rails/rspec.yml)](https://github.com/spohlenz/tinymce-rails/actions)
11
17
 
12
18
 
13
19
  Instructions
@@ -50,14 +56,14 @@ alternate:
50
56
  - table
51
57
  ```
52
58
 
53
- See the [TinyMCE 6 Documentation](https://www.tiny.cloud/docs/tinymce/6/) for a full list of configuration options.
59
+ See the [TinyMCE 7 Documentation](https://www.tiny.cloud/docs/tinymce/7/) for a full list of configuration options.
54
60
 
55
61
 
56
62
  **3. Include the TinyMCE assets**
57
63
 
58
64
  Use *one* of the following options to include TinyMCE assets.
59
65
 
60
- (1) Add to your application.js:
66
+ (1) Add to your application.js (Sprockets only):
61
67
 
62
68
  ```js
63
69
  //= require tinymce
@@ -66,23 +72,27 @@ Use *one* of the following options to include TinyMCE assets.
66
72
  or (2) add the script tag to your layout using the `tinymce_assets` helper:
67
73
 
68
74
  ```erb
69
- <%= tinymce_assets %>
70
- #=> <script type="text/javascript" src="/assets/tinymce.js">
75
+ <%= tinymce_assets data: { turbo_track: "reload" } %>
76
+ #=> <script type="text/javascript" src="/assets/tinymce.js" data-turbo-track="reload">
71
77
  ```
72
78
 
79
+ 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.
80
+
81
+ For Sprockets, these are bundled together into one script tag.
82
+
73
83
 
74
84
  **4. Initialize TinyMCE**
75
85
 
76
86
  For each textarea that you want to use with TinyMCE, add the "tinymce" class and ensure it has a unique ID:
77
87
 
78
88
  ```erb
79
- <%= text_area_tag :content, "", :class => "tinymce", :rows => 40, :cols => 120 %>
89
+ <%= text_area_tag :content, "", class: "tinymce", rows: 40, cols: 120 %>
80
90
  ```
81
91
 
82
92
  or if you are using Rails' form builders:
83
93
 
84
94
  ```erb
85
- <%= f.text_area :content, :class => "tinymce", :rows => 40, :cols => 120 %>
95
+ <%= f.text_area :content, class: "tinymce", rows: 40, cols: 120 %>
86
96
  ```
87
97
 
88
98
  Then invoke the `tinymce` helper to initialize TinyMCE:
@@ -94,7 +104,7 @@ Then invoke the `tinymce` helper to initialize TinyMCE:
94
104
  Custom options can be passed to `tinymce` to override the global options specified in `config/tinymce.yml`:
95
105
 
96
106
  ```erb
97
- <%= tinymce :theme => "simple", :language => "de", :plugins => ["wordcount", "paste"] %>
107
+ <%= tinymce theme: "simple", language: "de", plugins: ["wordcount", "paste"] %>
98
108
  ```
99
109
 
100
110
  Alternate configurations defined in 'config/tinymce.yml' can be used with:
@@ -116,7 +126,7 @@ Manual Initialization
116
126
  Using the `tinymce` helper and global configuration file is entirely optional. The `tinymce.init` JS function can be invoked manually if desired.
117
127
 
118
128
  ```erb
119
- <%= text_area_tag :editor, "", :rows => 40, :cols => 120 %>
129
+ <%= text_area_tag :editor, "", rows: 40, cols: 120 %>
120
130
 
121
131
  <script type="text/javascript">
122
132
  tinymce.init({