tinymce-rails 4.5.6 → 4.9.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +3 -2
  3. data/app/assets/javascripts/tinymce/preinit.js.erb +0 -6
  4. data/app/assets/javascripts/tinymce/rails.js +51 -0
  5. data/app/assets/javascripts/tinymce-jquery.js +1 -2
  6. data/app/assets/javascripts/tinymce.js +1 -0
  7. data/app/assets/source/tinymce/tinymce.js +27440 -49212
  8. data/lib/tinymce/rails/asset_installer/compile.rb +6 -6
  9. data/lib/tinymce/rails/asset_installer/copy.rb +11 -9
  10. data/lib/tinymce/rails/asset_installer/copy_no_preserve.rb +14 -0
  11. data/lib/tinymce/rails/asset_installer.rb +11 -10
  12. data/lib/tinymce/rails/asset_manifest.rb +25 -25
  13. data/lib/tinymce/rails/configuration.rb +86 -29
  14. data/lib/tinymce/rails/configuration_file.rb +11 -11
  15. data/lib/tinymce/rails/engine.rb +5 -1
  16. data/lib/tinymce/rails/helper.rb +29 -17
  17. data/lib/tinymce/rails/version.rb +2 -2
  18. data/lib/tinymce/rails.rb +8 -0
  19. data/vendor/assets/config/tinymce-rails.manifest.js +8 -0
  20. data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -1
  21. data/vendor/assets/javascripts/tinymce/license.txt +6 -6
  22. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
  23. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
  24. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
  25. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -1
  26. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
  27. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
  28. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
  29. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
  30. data/vendor/assets/javascripts/tinymce/plugins/codesample/css/prism.css +46 -46
  31. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
  32. data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +1 -1
  33. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -1
  34. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
  35. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -1
  36. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -1
  37. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
  38. data/vendor/assets/javascripts/tinymce/plugins/help/img/logo.png +0 -0
  39. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -0
  40. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
  41. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -1
  42. data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +1 -1
  43. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
  44. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
  45. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
  46. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
  47. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
  48. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
  49. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
  50. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
  51. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
  52. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
  53. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
  54. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -1
  55. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
  56. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
  57. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
  58. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -1
  59. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -2
  60. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -1
  61. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
  62. data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +1 -1
  63. data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +1 -1
  64. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/css/visualblocks.css +95 -76
  65. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
  66. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
  67. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
  68. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.inline.min.css +1 -1
  69. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.min.css +1 -1
  70. data/vendor/assets/javascripts/tinymce/skins/lightgray/content.mobile.min.css +1 -0
  71. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
  72. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  73. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.svg +2 -1
  74. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  75. data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  76. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -1
  77. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.mobile.min.css +2 -0
  78. data/vendor/assets/javascripts/tinymce/themes/inlite/theme.js +1 -1
  79. data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +1 -0
  80. data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -1
  81. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -14
  82. metadata +12 -10
  83. data/vendor/assets/javascripts/tinymce/plugins/example/dialog.html +0 -8
  84. data/vendor/assets/javascripts/tinymce/plugins/example/plugin.js +0 -1
  85. data/vendor/assets/javascripts/tinymce/plugins/example_dependency/plugin.js +0 -1
  86. data/vendor/assets/javascripts/tinymce/plugins/layer/plugin.js +0 -1
  87. data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8ce876f5115a218c22ad426fae32fbd1a6385f6f
4
- data.tar.gz: 333fe57ad2fe86dbe1ba517da10db6e5af8ca2f5
2
+ SHA256:
3
+ metadata.gz: 2d4a9e6b463099f136b4a76925e428f4adbdc905d04d316a97b1ea3508a10ddf
4
+ data.tar.gz: 103162d595c1bd4948ef0f41c101a5388a77d521737855a076c4c077d7b92038
5
5
  SHA512:
6
- metadata.gz: 3dc9d4a2ea5b7d68276d9fd0d09e1acb3e97610a3c586252fb3dc48437cf71c10cf9b7ca9c831b22556b7ceae85274a06e4b9b0b60efdb42f3eecdfd846ee228
7
- data.tar.gz: d47376c6f32a823c559367104dadb28c9f333528a3da07d60e87972a0a5af9606455cca71bcf47bc2addabaf7bd3ac1c52132e9b57c7ad89c77373218b5c3941
6
+ metadata.gz: 80ed2f75eb71bab2b14c5d380d6c8c9400079f253baa34471102fd71afa3019a3931f1843375a00f47d0398e43eb672568a2c6960bb6cf06ce62a2f00bbc28c6
7
+ data.tar.gz: cbc4371630d008d8b2d308ad0cd9687b43487bfbdf9e6f1d15f0bff8295ea5c41a03fa213a3d1e488103ae234600cce3660993c411718d4bedf70ac6fe62ac14
data/README.md CHANGED
@@ -5,7 +5,7 @@ The `tinymce-rails` gem integrates the [TinyMCE](http://www.tinymce.com/) editor
5
5
 
6
6
  This gem is compatible with Rails 3.1.1 and higher (including Rails 4).
7
7
 
8
- This is the branch for TinyMCE 4. For TinyMCE 3.5.x, please see the [tinymce-3 branch](https://github.com/spohlenz/tinymce-rails/tree/tinymce-3).
8
+ This is the branch for TinyMCE 4. For TinyMCE 5, please see the [master branch](https://github.com/spohlenz/tinymce-rails), and for TinyMCE 3.5.x, please see the [tinymce-3 branch](https://github.com/spohlenz/tinymce-rails/tree/tinymce-3).
9
9
 
10
10
  [![Build Status](https://travis-ci.org/spohlenz/tinymce-rails.png?branch=master)](https://travis-ci.org/spohlenz/tinymce-rails)
11
11
 
@@ -45,6 +45,7 @@ default:
45
45
  - link
46
46
 
47
47
  alternate:
48
+ <<: *default
48
49
  selector: textarea.table-editor
49
50
  toolbar: styleselect | bold italic | undo redo | table
50
51
  plugins:
@@ -146,7 +147,7 @@ The default method (as of 4.5.2), `compile`, adds the TinyMCE paths to the Sproc
146
147
  config.tinymce.install = :compile
147
148
  ```
148
149
 
149
- If you experience issues with the `compile` method, you may wish to use the `copy` method instead, which copies the TinyMCE assets directly into `public/assets` and appends the file information into the asset manifest.
150
+ If you experience issues with the `compile` method, you may wish to use the `copy` method instead, which copies the TinyMCE assets directly into `public/assets` and appends the file information into the asset manifest. The `copy_no_preserve` method is also available of you do not wish to or cannot preserve file modes on your filesystem.
150
151
 
151
152
  ```ruby
152
153
  config.tinymce.install = :copy
@@ -2,9 +2,3 @@ window.tinymce = window.tinymce || {
2
2
  base: '<%= TinyMCE::Rails::Engine.base %>',
3
3
  suffix: ''
4
4
  };
5
-
6
- if (typeof Turbolinks != 'undefined' && Turbolinks.supported) {
7
- document.addEventListener('turbolinks:before-render', function() {
8
- tinymce.remove();
9
- });
10
- }
@@ -0,0 +1,51 @@
1
+ window.TinyMCERails = {
2
+ configuration: {
3
+ default: {}
4
+ },
5
+
6
+ initialize: function(config, options) {
7
+ if (typeof tinyMCE != 'undefined') {
8
+ // Merge the custom options with the given configuration
9
+ var configuration = TinyMCERails.configuration[config || 'default'];
10
+ configuration = TinyMCERails._merge(configuration, options);
11
+
12
+ tinyMCE.init(configuration);
13
+ } else {
14
+ // Wait until TinyMCE is loaded
15
+ setTimeout(function() {
16
+ TinyMCERails.initialize(config, options);
17
+ }, 50);
18
+ }
19
+ },
20
+
21
+ setupTurbolinks: function() {
22
+ // Remove all TinyMCE instances before rendering
23
+ document.addEventListener('turbolinks:before-render', function() {
24
+ tinymce.remove();
25
+ });
26
+ },
27
+
28
+ _merge: function() {
29
+ var result = {};
30
+
31
+ for (var i = 0; i < arguments.length; ++i) {
32
+ var source = arguments[i];
33
+
34
+ for (var key in source) {
35
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
36
+ if (Object.prototype.toString.call(source[key]) === '[object Object]') {
37
+ result[key] = TinyMCERails._merge(result[key], source[key]);
38
+ } else {
39
+ result[key] = source[key];
40
+ }
41
+ }
42
+ }
43
+ }
44
+
45
+ return result;
46
+ }
47
+ };
48
+
49
+ if (typeof Turbolinks != 'undefined' && Turbolinks.supported) {
50
+ TinyMCERails.setupTurbolinks();
51
+ }
@@ -1,3 +1,2 @@
1
- //= require tinymce/preinit.js
2
- //= require tinymce/tinymce.js
1
+ //= require tinymce.js
3
2
  //= require tinymce/jquery.tinymce.js
@@ -1,2 +1,3 @@
1
+ //= require tinymce/rails.js
1
2
  //= require tinymce/preinit.js
2
3
  //= require tinymce/tinymce.js