spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
816 stars 258 forks source link

Multiple configs #74

Closed Saicheg closed 12 years ago

Saicheg commented 12 years ago

According issue #63:

Now we can define different configs it tinymce.yml and use them:

default:
  config1...

custom:
  config2..

It supports backwards-compatible, so nothing will crash for users who use old syntax.

spohlenz commented 12 years ago

Thanks for your help with this, and sorry it has taken me so long to get around to reviewing.

I've changed the implementation slightly, particularly within Configuration/MultipleConfiguration. In addition, I've made the following changes that affect usage:

  1. Changed the condition for when to use the multiple configuration format: if the 'default' key is found then multiple configurations are used. Some of the TinyMCE configuration options such as formats are given as hashes which could break the previous detection method.
  2. The custom configuration name is now given as a first optional argument to the tinymce helper.