On Sat, Feb 23, 2013 at 12:04 PM, Peter Pavlovich <[email protected]> wrote: > Greetings, > > I am trying to integrate the standard rails CKEditor gem with hobo and was > curious if anyone else had done this before I spend the time working this > through myself. > > The gem documentation says one should use the following to add a > CKEditor-customized text field to a form: > > <%= form.cktext_area :content, :value => "Default value", :id => > "sometext" %> > > Assume I have a model class called "MyModel" with an attribute named > "content" which is of type :text. How would one best make this happen in > Hobo? > > I assume I could create a custom "type" called :ck_text and then create a > <input for"ck_text"> tag, but what would go inside that tag definition. Do I > have access to the "form" so I could just use the code snippet provided by > the gem author given above?
No, you don't. I see two approaches: 1) generate a quick hobo-free rails app to see what HTML form.cktext_area generates, and use that to create an <input for="ck_text"> tag 2) just look at the basic CKEditor documentation, and follow the instructions there, just using the ckeditor gem for it's asset pipeline. Whatever you do, a hobo_ckeditor plugin would be greatly appreciated once you get it figured out, as you're not the first to ask. It could be fairly simple: a dependency on the ckeditor gem plus an input tag. Adding a rich type would be nice as well, but not necessary. cheers, Bryan -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
