Calling coffeescript from view

I am using a WYSIWYG “ckeditor” in my rails project (ckeditor_rails
gem).
I am trying to figure out how to apply different toolbar configs on
different pages.

Here is the setup…

In the view I have <%= text_area_tag id=“ck_a”,
@formatted_question[:anno_a], :class=>‘ckeditor’ %>

I have created a toolbar type in the ckeditor/config.js.coffee file
(=None) which I would like to use on certain pages. The default is a
full toolbar .
CKEDITOR.editorConfig = (config) ->
config.language = “en-us”
config.uiColor = “#AADC6E
true
config.toolbar_None = []

I am trying to figure out a way to pass the toolbar type through the
text_area_tag options hash in the view to the javascript config but
really I don’t have a clue how to do this.

Just looking to be pointed in the right direction.

DC

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs