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 ide menu ect. This is a
partial fix only as URL links not working.
Any help would be greatly appreciated.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.