HTMLEditor customization

Andy Goryachev andy.goryachev at oracle.com
Mon Jul 22 15:27:26 UTC 2024


    /**

     * Represents commands that can be passed into the HTMLEditor web engine.

     */

    public enum Command {

line 1167

-andy



From: openjfx-discuss <openjfx-discuss-retn at openjdk.org> on behalf of Tom Eugelink <tbee at tbee.org>
Date: Saturday, July 20, 2024 at 00:21
To: openjfx-discuss at openjdk.org <openjfx-discuss at openjdk.org>
Subject: Re: HTMLEditor customization
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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-discuss/attachments/20240722/c1f1d44d/attachment-0001.htm>


More information about the openjfx-discuss mailing list