ckeditor_rails gem issue

Using Rails 3.2 and gem 'ckeditor_rails', '~>'

Trying to set instance of ckeditor to wysiwyg if opening on a particular page so user is able to read and click on links but not edit.

Here is my file:

CKEDITOR.editorConfig = (config) ->

    config.language = "en-us"     true = 'kama'     config.toolbar_None =

    pageTitles = document.getElementsByTagName("title")     pageName=pageTitles[0].childNodes[0].nodeValue;     if pageName == "StudyAide | Question"         config.toolbar = "None"         config.uiColor = "#FFFFFF"         config.toolbarCanCollapse = false         config.removePlugins = 'elementspath'         config.removePlugins = 'resize'         config.readOnly = true         config.startupMode = 'wysiwyg'     else         config.toolbar = "Full"         config.uiColor = "#CCCCCC"

All config settings other than config.startupMode = 'wysiwyg' are working. Had to add other config lines for StudyAide | Question page as cant get it into wysiwyg mode and need to ide menu ect. This is a partial fix only as URL links not working.

Any help would be greatly appreciated.