tags:

views:

159

answers:

1

Background:

To add some basic HTML/rich text editing to our application that is compatible with our web interface I am attempting to embedded CKEditor within the swing based webrenderer browser. Webrenderer acts like a swing component and then loads up my simple HTML page containing an invocation to start CKEditor.

This works fine and I am able to set/get the edited HTML text within my application.

Problem:

The issue I'm seeing is that whenever the ENTER key is hit it is as if it is processed twice. E.g each press of the ENTER key generates 2 lines in the edited text. Or if typing in a bullet list then a press of ENTER causes the list to terminate an text entry to start on a fresh line below (same behaviour as if you hit ENTER twice in a normal browser).

If I switch CKEditor to source mode or if I use a basic HTML textarea then ENTER behaves normally. Also if I load my simple editor page into firefox directly then it works fine.

I guess some interaction is occuring between CKEditor and the swing browser. (I've recently noticed that if the browser is used inside a JDialog with default button then any hit of ENTER activates the default button, so not sure where the handling of ENTER is between swing and webrenderer)

Thanks, Rob.

A: 

May Be Useful CKEditor Tutorial

Desert Fox