Load tinymce in JavaFX Webview - Stack Overflow

We have a JavaFX WebView that needs to load a simple HTML page containing a tinymce v4 editor.This wo

We have a JavaFX WebView that needs to load a simple HTML page containing a tinymce v4 editor. This works fine in older versions of Java (Java 11). But in Java 21, tinymce v4 doesn't load in the jfx webview at all. We have also tried with tinymce 7.5, and that doesn't work in Java 11 or Java 21.

We even see this issue if we point the webview at the TinyMCE demo page (the page renders, but the editor pane in it does not take on tinymce functionality): /docs/tinymce/latest/full-featured-premium-demo

Code is simple:

public class Main extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    public void start(Stage primaryStage) {
        primaryStage.setTitle("JavaFX WebView Example");

        WebView webView = new WebView();

        webView.getEngine().setJavaScriptEnabled(true);
        webView.getEngine().setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36");
        webView.getEngine().load("/docs/tinymce/latest/full-featured-premium-demo");

        VBox vBox = new VBox(webView);
        Scene scene = new Scene(vBox, 960, 600);

        primaryStage.setScene(scene);
        primaryStage.show();

    }

}

The demo page works fine in regular browsers.

There is no console output. I have confirmed that there are no Javascript exceptions being thrown.

Does anyone have any guidance on how to proceed? WebView is so opaque that I don't have any ideas on how to even diagnose what might be different between JFX and a regular browser.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745641416a4637717.html

相关推荐

  • Load tinymce in JavaFX Webview - Stack Overflow

    We have a JavaFX WebView that needs to load a simple HTML page containing a tinymce v4 editor.This wo

    22天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信