asciidoctor / asciidoctor-intellij-plugin

AsciiDoc plugin for products on the IntelliJ platform (IDEA, RubyMine, etc)
https://intellij-asciidoc-plugin.ahus1.de/
Apache License 2.0
345 stars 146 forks source link

Support for asciidoctor-tabs rendering #1425

Closed mikeholler closed 10 months ago

mikeholler commented 11 months ago

Why the new feature should be added

Asciidoctor tabs is an official asciidoctor plugin and it would be nice to have some rendering in IntelliJ. First-party plugins like asciidoctor-diagram are already supported in the plugin and this would be a nice next step.

Right now, when I copy tabs.adoc from the syntax section of asciidoctor-tabs, I get the following rendering:

Screenshot from 2023-08-30 11-41-13

How the new feature should work

I would like to see rendering with a default CSS stylesheet, looking something like this crude mockup shamelessly stolen from here:

image image

ahus1 commented 11 months ago

Thank you for suggesting this. The next version of this plugin will support it when using the Browser preview and the JCEF preview (the default preview). JavaFX and Swing will not support it.

I'll update this issue once a preview release is available.

ahus1 commented 11 months ago

There is now version 0.40.3 of the plugin available. I tried your example and it worked for me: The preview shows the tabs, and it also keeps showing the tab when editing the content.

Please give it a try if it works as expected for you. If it doesn't, please provide an example and a screen shot / screen recording.

See below for an example recording.

tabs-preview

mikeholler commented 11 months ago

It's working! Thank you @ahus1 :heart:

ahus1 commented 11 months ago

Happy to help and thank you for the suggestion.

sroach commented 10 months ago

One observation I have is the preview works great but when I use the html button to create a document with this plugin the tabs are not present in the document. Is that expected? Am I missing something?

mikeholler commented 10 months ago

@sroach asciidoctor-tabs is a plugin and not enabled out of the box, similar to asciidoctor-diagrams.

sroach commented 10 months ago

@sroach asciidoctor-tabs is a plugin and not enabled out of the box, similar to asciidoctor-diagrams.

Is there a way to get this plugin in a java environment I am using asciidoctorj at the moment.

ahus1 commented 10 months ago

I'll give it a try and see that the HTML button renders tabs as well.

ahus1 commented 10 months ago

I needed rearrange some files and folders so that the plugins picks up the necessary JavaScript and CSS from the right places.

There is now pre-release 0.40.5 which adds the following:

Please give it a try and let me know if it works for you.

The pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.

sroach commented 10 months ago

Sorry for the delay, I can confirm the changes you've made works.

ahus1 commented 10 months ago

Thank you for checking this - closing this issue!