Forum: Ruby on Rails ckeditor_rails gem issue

Posted by Dave Castellano (dcastellano1)
on 2013-01-08 03:04
Using Rails 3.2 and gem 'ckeditor_rails', '~> 3.6.4.1'

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 config.js.coffee file:

CKEDITOR.editorConfig = (config) ->

    config.language = "en-us"
    true
    config.skin = '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 hide menu ect.  This is a
partial fix only as URL links not working.

Any help would be greatly appreciated.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.