WebView and Aloha Editor

Fabrizio Giudici Fabrizio.Giudici at tidalwave.it
Sat Jun 29 12:44:57 PDT 2013

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  

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?


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 - fabrizio.giudici at tidalwave.it

More information about the openjfx-dev mailing list