Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Enable text selection in a custom widget
Enable text selection in a custom widget [message #1424294] Mon, 15 September 2014 19:39 Go to next message
Christian Hager is currently offline Christian HagerFriend
Messages: 53
Registered: July 2009
Location: Germany
Member
I'm trying to implement a CKEditor Widget (based on CK 4.4.4) with inline editing as a custom widget. This works great so far except that RAP is blocking text selections. How can I enable those in custom widgets?

Thanks
Christian
Re: Enable text selection in a custom widget [message #1424724 is a reply to message #1424294] Tue, 16 September 2014 10:21 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hi.

If you are in the same document as RAP (and not in an iframe/browser
widget), you probably need to catch the DOM
(on)select/(on)selectstart/(on)selectionchange events and call
"event.cancelBubble = true;" and "event.stopPropagation();" on them so
RAP doesn't cancel them. Be sure to also test this in IE8 if you want to
support it.

However, afaik CKEditor has all it's text inside an iframe, and RAP
doesn't do anything with stuff that happens in iframes. Also, as you may
be aware, we already have a CKEditor 3.x based RAP widget, and an
upgrade to the CKeditor 4.x may be coming this year.

Greetings,
Tim


Am 15.09.2014 21:39, schrieb Christian Hager:
> I'm trying to implement a CKEditor Widget (based on CK 4.4.4) with
> inline editing as a custom widget. This works great so far except that
> RAP is blocking text selections. How can I enable those in custom widgets?
>
> Thanks
> Christian

--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Enable text selection in a custom widget [message #1425375 is a reply to message #1424724] Wed, 17 September 2014 08:08 Go to previous message
Christian Hager is currently offline Christian HagerFriend
Messages: 53
Registered: July 2009
Location: Germany
Member
Hi and thanks,

catching those three DOM events works great. This is necessary because in inline editing mode (http://ckeditor.com/demo#inline) ckeditor works without an iframe.

Greetings
Christian
Previous Topic:RAP 2.3 - keeping selected value on ComboViewer
Next Topic:Dialog.open() method packs all my Views
Goto Forum:
  


Current Time: Wed Apr 24 21:40:45 GMT 2024

Powered by FUDForum. Page generated in 0.03092 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top