最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Load tinymce in JavaFX Webview - Stack Overflow

programmeradmin2浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论