<live-editor> with CKEditor?

39 views
Skip to first unread message

Tim Griffin

unread,
Apr 20, 2014, 10:31:21 PM4/20/14
to hobo...@googlegroups.com
Hi all;

Anyone have an approach to getting the CKEditor to work under a <live-editor> tag? 

Is it even possible? 

I'm using CKEditor as a gem in a Hobo 2.1.0, Rails 3.2.12 app:

gem "ckeditor", :git => 'git://github.com/fxposter/ckeditor.git'

I have a content field defined as an html field in my model, and a javascript function to replace html fields with ckeditors. That works nicely. Then, I thought:

<feckless-fieldset class="horizontal" fields="content">
  <content-view:>
    <live-editor/>
  </content-view:>
</feckless-fieldset>

But, I was being overly hopeful.

Tim





Ignacio Huerta

unread,
Apr 21, 2014, 6:04:08 AM4/21/14
to hobo...@googlegroups.com
Hi Tim,

I have not tried with CKEditor and live-editor, and I have used
wysihtml5 editor with hot-input :P. Not the same but maybe the code will
help you.

This is the code I used to embed the editor:

<hot-input field="contenido" path="/attachments/#{@attachment.id}" >
<input id="wysihtml5" style="width:100%; height:355px;"/>
</hot-input>

What I wanted to happen was: "Whenever a user edits this field, I want
an Ajaz call made and the content saved". But the problem was that the
"change" event from wysyhtml5 was not being "pushed" to the hot-input.

The solution was a bit of Coffeescript:

# This code runs onload
wysihtml5 = $('#wysihtml5').wysihtml5({
locale: 'es-ES',
lists: false,
image: false,
link: false,
events: {
"change": ->
wysihtml5_callback
}
})

@wysihtml5_callback = ->
$('#wysihtml5').trigger('change')

Warm regards,
Ignacio



El 21/04/14 04:31, Tim Griffin escribió:
> Hi all;
>
> Anyone have an approach to getting the CKEditor to work under a
> <live-editor> tag?
>
> Is it even possible?
>
> I'm using CKEditor as a gem in a Hobo 2.1.0, Rails 3.2.12 app:
>
> gem "ckeditor", :git => 'git://github.com/fxposter/ckeditor.git'
>
> I have a /content/ field defined as an /html/ field in my model, and a
> javascript function to replace /html/ fields with ckeditors. That works
> nicely. Then, I thought:
>
> <feckless-fieldset class="horizontal" fields="content">
> <content-view:>
> <live-editor/>
> </content-view:>
> </feckless-fieldset>
>
> But, I was being overly hopeful.
>
> Tim
>
>
>
>
>
> --
> 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 hobousers+...@googlegroups.com
> <mailto:hobousers+...@googlegroups.com>.
> To post to this group, send email to hobo...@googlegroups.com
> <mailto:hobo...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/d/optout.

Tim Griffin

unread,
Apr 21, 2014, 6:49:11 AM4/21/14
to hobo...@googlegroups.com
Ah, thanks very much Ignacio!

I'll see if I can work something like this out with CKEditor, and post back.

Tim



You received this message because you are subscribed to a topic in the Google Groups "Hobo Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hobousers/vELhG16Wo_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hobousers+...@googlegroups.com.
To post to this group, send email to hobo...@googlegroups.com.

Stefan Haslinger

unread,
Apr 21, 2014, 3:54:20 PM4/21/14
to hobo...@googlegroups.com

Tim Griffin

unread,
Apr 21, 2014, 4:12:16 PM4/21/14
to hobo...@googlegroups.com
Ah, marvelous, Stefan! Thanks for pointing me to that. I'm not sure why your original post didn't come up in my search, but I appreciate the pointer. Will give it a shot.

Best regards,
Tim



--

Owen Dall

unread,
Apr 21, 2014, 5:36:41 PM4/21/14
to Hobo Users
Yes, thanks for that, Stefan.




-Owen


Owen Dall

Vice President | Chief Technology Officer

Barquin International

Office: 202.296.7147 | Mobile: 410.991.0811

Fax: 202.296.8903 | email: od...@barquin.com

BI_Logo_2012_JPEG

 

NOTICE: If you have received this message in error, please contact the sender immediately and be aware that the use, copying, or dissemination of this information is prohibited. This email transmission contains information from Barquin International that may be considered privileged or confidential and is intended solely for the named recipient.










--
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 hobousers+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages