AsciiDoc rendering in IntelliJ under JDK6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

AsciiDoc rendering in IntelliJ under JDK6

mojavelinux
Administrator
I want to start off by saying that I'm happy to report the IntelliJ AsciiDoc {1} plugin has a new maintainer, Erik Pragt {2}. Erik has upgraded the plugin to the latest JRuby and AsciidoctorJ releases and restored support for JDK6. He published a new version to the JetBrains plugin portal. You can download it here:


Look for more updates in the near future.

Erik has also started working on some new features, such as a CSS stylesheet to match IntelliJ's Darkula theme. He's also exploring the use of Asciidoctor.js as an alternative to Asciidoctor on JRuby.

That brings me to topic in the $subject. Erik restored JDK6 support since he--and many other IntelliJ users on OSX--need to use JDK6 to run IntelliJ properly. It now works, but the major drawback of using JDK6 is the embedded browser. I think this is the single biggest challenge for this plugin.

Here are the concerns I shared in a previous thread:

I got frustrated with the grossly deficient HTML renderer in Swing. Using it is reminiscent of writing web pages back in 1999. I'd only seriously recommend this plugin if the Swing HTML renderer could be swapped out for the new WebKit-based renderer in Java. Then, we can actually get some decent styling of the HTML.

If we're willing to accept basic styling of the HTML, then I'd say we should bundle a new, minimal stylesheet (hence the Darkula effort). Unfortunately, there are many CSS properties and selectors you won't be able to use (and forget that CSS3 or web fonts even exist). The browser also doesn't seem to allow you to style elements that have more than one CSS class, which is frequent occurrence in the HTML output from Asciidoctor.

While it's true that the default Asciidoctor stylesheet appears to work in the preview now, you'll notice that many of the blocks don't look the same as when you view the document in Chrome or Firefox. What you are seeing is the extremely deficient browser in JDK6 and JDK7 sucking.

Ideally, we need to find way to get the preview pane to use WebKit. If JDK6 isn't a hard requirement, that's easy. We just use the JavaFX WebView (like AsciiDocFX {3}). If JDK6 is a hard requirement, then we need to see if there's some way to get a third-party library that allows us to embed a decent browser (ideally WebKit).

Cheers & Good Luck!