Perhaps Fabrizio's selection issues are related to the following issues:

https://javafx-jira.kenai.com/browse/RT-18883 Google Docs editing issues
https://javafx-jira.kenai.com/browse/RT-11239 Add drawGlyphVector type support 
to prism graphics

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Fabrizio Giudici
Sent: Saturday, June 29, 2013 12:45 PM
To: [email protected]
Subject: WebView and Aloha Editor

First, as this is my first post here, cheers to everybody.

So far I've been using WebView - other than pure HTML rendering - e.g. in 
embedding some JavaScript-based legacy application inside a rich desktop 
application, and it worked fine. It only needed some patches to the JavaScript 
code (that was some old one, not perfectly portable, written for Firefox). So, 
my idea was: as soon as I have some JavaScript that works with a WebKit 
browser, it's going to work with WebView.

Now I'm developing a JavaFX application that provides editing features to a 
CMS. One of the features is the editing of XHTML documents. The HTMLEditor 
component does a very poor job of rendering, and I want JavaScript support, so 
I'm trying a WYSIWYG HTML editor made in JavaScript (Aloha Editor) with WebView 
(and a small embedded webserver under the hood).

I supposed there were not major problems, as Aloha works well with WebKit 
browsers. Instead some surprise came: some things work and some are broken, 
e.g. selecting a sequence of characters and applying a bold style eats up some 
parts.

I supposed that JavaScript support in WebView is exactly the original one in 
WebKit. Am I wrong?

Thanks.

PS After some more analysis, I wonder whether this is related to the font 
rendering engine. When I do a text selection, I see that the selection box is 
not precisely placed over the original text, but often it appears with a 
horizontal shift. I'm not an expert of JavaScript and I don't know how the text 
manipulation in Aloha works, but I wonder whether a font rendering that is not 
the original of WebKit can cause harm.

--
Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
http://tidalwave.it/fabrizio/blog - [email protected]

Reply via email to