Login  Register

Re: IntelliJ plugin - can I detect preview mode?

Posted by mojavelinux on May 01, 2020; 9:02pm
URL: https://discuss.asciidoctor.org/IntelliJ-plugin-can-I-detect-preview-mode-tp7961p7965.html

Here's what we use for the preview in Atom

https://github.com/asciidoctor/atom-asciidoc-preview/blob/master/package.json#L132

If we need something more generic than env=browser env-browser, we should probably discuss in an issue so that the various plugins can align.

Best Regards,

-Dan

On Thu, Apr 30, 2020 at 12:42 PM Alexander Schwartz [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I had another look and there is an implicit difference between creating the HTML with the button and the preview: In the preview the attribute "embedded" is set. The following will work:
ifdef::embedded[]
Only shown if in preview
endif::[]
Alexander Schwartz ([hidden email])
https://www.ahus1.de



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/IntelliJ-plugin-can-I-detect-preview-mode-tp7961p7963.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux