HTMLEditor customization

Tom Eugelink tbee at tbee.org
Sat Jul 20 07:20:44 UTC 2024


It seems those 10 year old hacks are not working anymore. All of the 'selection' objects in javascript appear to be either null, or unwilling to return a range.

The other approach would be to extend the HTMLEditor implementation, because why not? While investigating that approach I got confused:
https://github.com/javafxports/openjdk-jfx/blob/develop/modules/javafx.web/src/main/java/javafx/scene/web/HTMLEditorSkin.java
import static javafx.scene.web.HTMLEditorSkin.Command.*;

Where did the Command enum hide? It should be in the HTMLEditorSkin class?


On 2024-07-19 07:37, Tom Eugelink wrote:
> I was wondering; is the HTML editor still at the point where any customization is done by executing javascript code via the WebEngine? I find some 10 year old or so articles on how to insert things at the cursor position using that approach. And inserting additional buttons in the toolbar by finding it via its CSS class?
>
> Because the vanilla version of the HTML editor is limited; no image support and all.
>
> Regards, Tom
>
>



More information about the openjfx-discuss mailing list