Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
e5803f8
fix for tinyMCE undefined in asynchronous javascript load
musaffa Mar 16, 2015
6088dad
Allow to call helper methods with the module as a receiver.
heaven Sep 22, 2015
dd6e8f7
Merge pull request #185 from heaven/master
spohlenz Sep 25, 2015
e982226
Update helper module comments
spohlenz Sep 25, 2015
0056a84
Merge pull request #171 from musaffa/tinymce_wait_asynchronous_load
spohlenz Oct 12, 2015
ca606a3
Nicer indentation of JS output from helper
spohlenz Oct 12, 2015
f18c397
Update to TinyMCE 4.2.6
spohlenz Oct 12, 2015
363e8a2
Restore Rails 3.2 compatibility
spohlenz Oct 12, 2015
452ca69
Update to TinyMCE 4.2.7
spohlenz Oct 31, 2015
7cda2f0
Update to TinyMCE 4.2.8
spohlenz Nov 13, 2015
a1ff169
Update to TinyMCE 4.3.0
spohlenz Nov 23, 2015
134e1e4
Update to TinyMCE 4.3.1
spohlenz Nov 30, 2015
9fc3431
Update to TinyMCE 4.3.2
spohlenz Dec 16, 2015
2348a6c
Update bundler before running travis
spohlenz Dec 16, 2015
dbb107c
Remove automatic language detection as it conflicts with sprockets-ra…
spohlenz Jan 2, 2016
3c680b2
Update travis Gemfiles
spohlenz Jan 2, 2016
701d2c8
Disable debug assets in test mode
spohlenz Jan 2, 2016
e6e9a0c
Update to TinyMCE 4.3.3
Gombally Jan 20, 2016
7b795bf
Merge pull request #194 from KentaaNL/tinymce-update-to-4.3.3
spohlenz Jan 24, 2016
ae2a5df
Fix link for config options in README
jmeridth Feb 4, 2016
ce95cd1
Change link to first configuration documentation page
jmeridth Feb 4, 2016
a9dede6
Merge pull request #196 from jmeridth/fix-configuration-options-link-…
spohlenz Feb 4, 2016
9c6aa19
Update download locations for version update
spohlenz Mar 10, 2016
f9b9290
Update to TinyMCE 4.3.7
spohlenz Mar 10, 2016
0ce00a9
Pin rake to < 11 for Travis build
spohlenz Mar 10, 2016
40ef6bd
Fix for last commit - apply to correct Gemfiles
spohlenz Mar 10, 2016
2696806
Update to TinyMCE 4.3.8
spohlenz Mar 16, 2016
14e2e00
Update to TinyMCE 4.3.12
spohlenz May 11, 2016
d4cdb8d
Remove Ruby 1.9.3 from Travis configuration
spohlenz May 11, 2016
52f71e3
Add test-unit to Gemfile for Rails 3.2
spohlenz May 11, 2016
9788885
Add Rails 5.0.0.rc1 Travis configuration
spohlenz May 11, 2016
5fd3904
Update Travis Gemfiles and add exclusions
spohlenz May 11, 2016
d4b003a
Update to TinyMCE 4.3.13
spohlenz Jun 13, 2016
4cbaab8
Update to TinyMCE 4.4.0
spohlenz Jul 3, 2016
3e805e0
Update to TinyMCE 4.4.1
spohlenz Jul 28, 2016
8f25b10
Update to TinyMCE 4.4.2
spohlenz Aug 31, 2016
4f561c6
Update to TinyMCE 4.4.3
spohlenz Sep 6, 2016
d43c46a
Update to TinyMCE 4.5.0
spohlenz Nov 29, 2016
f7e7158
Update to TinyMCE 4.5.1
spohlenz Dec 7, 2016
ed67b97
Update Gemfiles to not use pre-release versions
PanisSupraOmnia Dec 7, 2016
43c134b
Merge pull request #206 from ChallahuAkbar/update-gemfiles
spohlenz Dec 8, 2016
66fa9fd
Set default asset installation method to compile (closes #208)
spohlenz Jan 5, 2017
c580a5a
Remove Ruby 2.0.0 from Travis build
spohlenz Jan 5, 2017
6d266cf
Update to TinyMCE 4.5.2
spohlenz Jan 5, 2017
346bd8c
Remove usage of arguments.callee
spohlenz Feb 7, 2017
cd3f55f
Fix compatibility with Turbolinks
spohlenz Feb 7, 2017
c381af1
Update to TinyMCE 4.5.3
spohlenz Feb 7, 2017
9a46a5b
Improve behavior with Turbolinks
spohlenz Mar 4, 2017
164e274
Update to TinyMCE 4.5.4
spohlenz Mar 4, 2017
20dbd71
Update to TinyMCE 4.5.5
spohlenz Mar 8, 2017
f7f0787
Update to TinyMCE 4.5.6
spohlenz Mar 31, 2017
66f1861
Update rails patch and new ruby (#220)
ferdinandrosario Apr 11, 2017
1ddef2b
Offer an install strategy that does not preserve modes (#222)
botimer Apr 28, 2017
8a31db6
Update to TinyMCE 4.5.7
spohlenz Apr 28, 2017
41ce00c
Ensure that helper methods are public
spohlenz Apr 30, 2017
6ec46ac
Update to TinyMCE 4.6.0
spohlenz May 6, 2017
a958804
Add Travis Gemfile for Rails 5.1
spohlenz May 6, 2017
ec545b6
Update to TinyMCE 4.6.1
spohlenz May 16, 2017
a971332
Update to TinyMCE 4.6.2
spohlenz May 23, 2017
44ef633
Update to TinyMCE 4.6.3
spohlenz May 31, 2017
5131d64
Update to TinyMCE 4.6.4
spohlenz Jun 14, 2017
1109c47
Update to TinyMCE 4.6.5
spohlenz Aug 3, 2017
d8a859c
Update to TinyMCE 4.6.6
spohlenz Aug 31, 2017
f584dc6
Update to TinyMCE 4.6.7
spohlenz Sep 18, 2017
c6981ee
Merge remote-tracking branch 'upstream/master' into update-to-v4
theInternauts Sep 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
tmp
*.gem
Gemfile.lock
gemfiles/*.lock
sandbox/log
sandbox/tmp
sandbox/public/assets
vendor/assets/**/*.less
19 changes: 15 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
language: ruby

before_install:
- gem update bundler

rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.7
- 2.3.4
- 2.4.1

gemfile:
- gemfiles/rails-3.2.gemfile
- gemfiles/rails-4.0.gemfile
- gemfiles/rails-4.1.gemfile
- gemfiles/rails-4.2.gemfile

- gemfiles/rails-5.0.gemfile
- gemfiles/rails-5.1.gemfile

matrix:
exclude:
- rvm: 2.4.1
gemfile: gemfiles/rails-4.0.gemfile
- rvm: 2.4.1
gemfile: gemfiles/rails-4.1.gemfile
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
source 'https://rubygems.org'

gem 'rails', '~> 4.2.1'
#gem 'rails', '~> 4.1.10'
gem 'rails', '~> 5.0.0'
#gem 'rails', '~> 4.2.5'
#gem 'rails', '~> 4.1.14'
#gem 'rails', '~> 4.0.13'
#gem 'rails', '~> 3.2.21'
#gem 'rails', '~> 3.2.22'

gem 'jquery-rails'
gem 'turbolinks'
gem 'uglifier'

group :test do
gem "test-unit", "~> 3.0"
gem "rspec-rails", "~> 3.2.1"
gem "rspec-rails", "~> 3.5.0"
gem "capybara", "~> 2.4.4"
end

Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ alternate:
- table
```

See the [TinyMCE 4 Documentation](http://www.tinymce.com/wiki.php/Configuration) for a full list of configuration options.
See the [TinyMCE 4 Documentation](https://www.tinymce.com/docs/configure/) for a full list of configuration options.


**3. Include the TinyMCE assets**
Expand Down Expand Up @@ -85,7 +85,7 @@ For each textarea that you want to use with TinyMCE, add the "tinymce" class and
```erb
<%= text_area_tag :content, "", :class => "tinymce", :rows => 40, :cols => 120 %>
```

or if you are using Rails' form builders:

```erb
Expand Down Expand Up @@ -114,7 +114,7 @@ Alternate configurations defined in 'config/tinymce.yml' can be used with:
Language Packs
--------------

See the [tinymce-rails-langs](https://github.com/spohlenz/tinymce-rails-langs) gem for additional language packs for TinyMCE. The `tinymce` helper will use the current locale as the language if available, falling back to English if the core language files are missing.
See the [tinymce-rails-langs](https://github.com/spohlenz/tinymce-rails-langs) gem for additional language packs for TinyMCE.


Manual Initialization
Expand All @@ -138,22 +138,20 @@ Asset Compilation

Since TinyMCE loads most of its files dynamically, some workarounds are required to ensure that the TinyMCE asset files are accessible using non-digested filenames.

As of tinymce-rails 3.5.11, 4.1.10 and 4.2.1, two alternative asset installation methods are available, which can be changed by setting `config.tinymce.install` within your `config/application.rb` file. Both methods are called when you run `rake asset:precompile` (via `Rake::Task#enhance`) after the regular application assets are compiled.
As of tinymce-rails 3.5.11, 4.1.10 and 4.2.1, two alternative asset installation methods are available, which can be changed by setting `config.tinymce.install` within your `config/application.rb` file. These methods are called when you run `rake asset:precompile` (via `Rake::Task#enhance`) after the regular application assets are compiled.

The default method, `copy`, copies the TinyMCE assets directly into `public/assets` and appends the file information into the asset manifest.
The default method (as of 4.5.2), `compile`, adds the TinyMCE paths to the Sprockets precompilation paths and then creates symlinks from the non-digested filenames to their digested versions.

```ruby
config.tinymce.install = :copy
config.tinymce.install = :compile
```

The new method, `compile`, adds the TinyMCE paths to the Sprockets precompilation paths and then creates symlinks from the non-digested filenames to their digested versions.
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.

```ruby
config.tinymce.install = :compile
config.tinymce.install = :copy
```

Due to compilation times, this method is only recommended using Rails 4 and up. This method is intended to eventually become the default, so please try it if it suits your environment and report any issues.

If you are including TinyMCE via `application.js` or using the `tinymce_assets` helper, you do not need to manually alter the precompile paths. However if you wish to include `tinymce-jquery.js` independently (i.e. using `javascript_include_tag`), you will need to add it to the precompile list in `config/environments/production.rb`:

```ruby
Expand Down
8 changes: 3 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ desc "Update TinyMCE to version #{TinyMCE::Rails::TINYMCE_VERSION}"
task :update => [ :fetch, :extract, :rename ]

task :fetch do
download("http://download.moxiecode.com/tinymce/tinymce_#{TinyMCE::Rails::TINYMCE_VERSION}.zip", "tinymce.zip")
download("http://download.moxiecode.com/tinymce/tinymce_#{TinyMCE::Rails::TINYMCE_VERSION}_dev.zip", "tinymce.dev.zip")
download("http://download.ephox.com/tinymce/community/tinymce_#{TinyMCE::Rails::TINYMCE_VERSION}.zip", "tinymce.zip")
download("http://download.ephox.com/tinymce/community/tinymce_#{TinyMCE::Rails::TINYMCE_VERSION}_dev.zip", "tinymce.dev.zip")
end

task :extract do
Expand All @@ -28,15 +28,13 @@ task :extract do
`mkdir -p vendor/assets/javascripts/tinymce`
`mv tmp/tinymce/js/tinymce/* vendor/assets/javascripts/tinymce/`
end

step "Extracting jQuery & unminified source files" do
`rm -rf tmp/tinymce`
`unzip -u tmp/tinymce.dev.zip -d tmp`
`mv tmp/tinymce/js/tinymce/jquery.tinymce.min.js vendor/assets/javascripts/tinymce/jquery.tinymce.js`
`mv tmp/tinymce/js/tinymce/tinymce.jquery.min.js vendor/assets/javascripts/tinymce/tinymce.jquery.js`
`mkdir -p app/assets/source/tinymce`
`mv tmp/tinymce/js/tinymce/tinymce.js app/assets/source/tinymce/tinymce.js`
`mv tmp/tinymce/js/tinymce/tinymce.jquery.js app/assets/source/tinymce/tinymce.jquery.js`
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/tinymce-jquery.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//= require tinymce/preinit.js
//= require tinymce/tinymce.jquery.js
//= require tinymce/tinymce.js
//= require tinymce/jquery.tinymce.js
6 changes: 6 additions & 0 deletions app/assets/javascripts/tinymce/preinit.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ window.tinymce = window.tinymce || {
base: '<%= TinyMCE::Rails::Engine.base %>',
suffix: ''
};

if (typeof Turbolinks != 'undefined' && Turbolinks.supported) {
document.addEventListener('turbolinks:before-render', function() {
tinymce.remove();
});
}
Loading