Does ToolWindow support for HTML/JS contents?
已回答
I'm creating a plugin for IntelliJ IDEA that needs to load local static web content(HTML, CSS, JS) into a ToolWindow and invoke a java method from that HTML/JS content. I used JavaFX WebView to load the HTML content into the ToolWindow. But when I tried to invoke the Java methods from HTML or JS, it didn't work, and sometimes it's giving fatal error and crashes the application.
Please let me know is there any other way to integrate static web content into ToolWindow.
请先登录再写评论。
Calling Java from the HTML/JS is not a good idea in many respects.
I'd also advise you to use JCEF instead of JavaFX, which is available since 2020.1 as an experimental feature.
There is a plan to deprecate using JavaFX in 3rd party plugins.