I am using gem 'ckeditor', '3.5.0', Rails 3..
It works fine in my 'New' and 'Edit' pages but not 'Show' page
'New' and 'Edit' pages using the following...
<%= form_for @question,
<%= f.cktext_area :correct_anno, :toolbar=>'Full', :width=>'1140px',
:height=>'250px' %>
and all is good.
Show action uses a virtual attribute 'formatted_question' which contains
a hash. Not using a form helper.
I am trying to populate the ckeditor field with the text from a field in
the hash (:correct_anno) and can't figure out how to format it.
This is the format I need to conform to:
<%= ckeditor_textarea("object", "field", :width => '100%', :height =>
'200px') %>
Have tried several variations including:
<%= ckeditor_textarea("Formatted_question",
"@formatted_question[:correct_anno]", ...
Not sure how to specify @formatted_question[:correct_anno] to ckeditor
"field"
Any help from a more experienced programmer would be really appreciated.
DC
on 2012-02-03 19:43
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
Log in with Google account | Log in with Yahoo account
No account? Register here.