Extension Options

The Asciidoctor Browser Extension uses an option dialog to configure custom attributes, different themes, security settings, the Kroki diagram generator and more.

Open the options on Chrome

To open the options dialog on Chrome, Edge, Chromium-based, Brave or Opera, you can use either of these methods:

Via the Extension icon

When the Asciidoctor Browser Extension icon (colored or gray) is visible on the extension toolbar, right-click Extension icon  Options

Via the chrome://extensions page
  1. Type chrome://extensions into the address bar and press Enter

  2. Type asciidoctor into the extension search bar then when the Asciidoctor Browser Extension block is visible, click its Details button

  3. Click the Extension options link

Open the options on Firefox

On Firefox, you can use either of these methods:

Via the Extension icon
  1. Right click Extension icon  Manage extension

  2. Click the Options tab

Via the hamburger menu
  1. Select Hamburger menu  Addons and themes

  2. Click Extensions

  3. Choose the Asciidoctor.js Live Preview extension

  4. Click the Options tab

Options

The options and their default settings are listed below:

Name Description Default value

A string of space-separated key=value attribute pairs (e.g., toc=left), that are appended to the header of each AsciiDoc page viewed by the browser. Learn more about attributes.

Empty

Asciidoctor options

Safe mode

Controls features related to security. Learn more about these values.

Safe

Files extension

Preview files with txt extension

By default, the extension will render ad, adoc, asc and asciidoc files. Useful when viewing raw text files with AsciiDoc content from hosted git providers or your local machine.

Unchecked

Poll for changes (automatic reload)

To files loaded from URLs

How often viewed URLs are polled for changes. URLs use the http or https protocol.

2 seconds

To local files

How often file URLs are polled for changes. Local files use the file protocol (or no protocol).

2 seconds

Diagrams extension (Images from text)

Enable the diagrams extension

The diagrams extension is sending the text diagrams to an instance of Kroki to display them as images in the preview. Kroki is a free open-source project.

When you enable the diagrams extension without changing the default server URL, you agree to the diagrams extension sending your diagrams to the free public cloud instance kroki.io for conversion.

Disabled

Server URL

By default, the diagram extensions sends your diagrams to the free public cloud instance kroki.io, but you can install Kroki on your own infrastructure. Once you’ve installed Kroki, make sure to update the server URL to point to your instance.

Option: Theme/Stylesheet

Theme/Stylesheet

The CSS styles to apply to the rendered HTML.

Default

Add a stylesheet

File name of CSS styles to apply to the rendered HTML.

Empty

Option: JavaScript

JavaScript dropdown

Add a custom JavaScript to the rendered HTML.

None

Load the JavaScript…​

Before or after the document has loaded.

Before