asciidoctor / asciidoctor-firefox-addon

:wolf: An add-on for Mozilla Firefox that converts AsciiDoc files to HTML directly in the browser using Asciidoctor.js.
https://addons.mozilla.org/en-US/firefox/addon/asciidoctorjs-live-preview/
MIT License
32 stars 9 forks source link

= Asciidoctor Firefox Addon (deprecated) Guillaume Grossetie :sources: https://github.com/asciidoctor/asciidoctor-firefox-addon :license: https://github.com/asciidoctor/asciidoctor-firefox-addon/blob/master/LICENSE :ff-addon-site: https://addons.mozilla.org/firefox/addon/asciidoctorjs-live-preview/ :latest-release: https://github.com/asciidoctor/asciidoctor-firefox-addon/releases/latest :jpm-install: https://www.npmjs.com/package/jpm

This project uses https://github.com/asciidoctor/asciidoctor.js[Asciidoctor.js] to render AsciiDoc as HTML inside Firefox!

[IMPORTANT]

No longer actively maintained since Firefox now supports WebExtensions API :tada:

In the past, there were several toolsets for developing Firefox extensions, but by the end of November 2017, extensions must be built using WebExtensions APIs. Extensions written using WebExtensions APIs for Firefox are designed to be cross-browser compatible. In most cases it will run in Chrome, Edge, and Opera with few if any changes. They are also fully compatible with multiprocess Firefox.

The code base for Chrome, Chromium, Opera and Firefox is now available at https://github.com/asciidoctor/asciidoctor-chrome-extension

== Usage

  1. Install the extension from the {ff-addon-site}[Firefox Add-ons site] or from the {latest-release}[GitHub latest release page]. When you download the xpi file, if Firefox downloads it instead of directly installing it, just drag and drop it on Firefox
  2. Open local or remote .ad, .adoc, .asc, .asciidoc file in Firefox
  3. Click on the Asciidoctor Live Preview button in the toolbar (button with an A icon) to activate or deactivate the rendering.

[[img-preview-active]] .An asciidoc file opened in firefox with HTML preview image::img/asciidoctor-preview-enabled.png[]

[[img-preview-inactive]] .An asciidoc file opened in firefox without HTML preview image::img/asciidoctor-preview-disabled.png[]

== Local build

To manually build the extension bundle (.xpi) from the source you need to install {jpm-install}[jpm].

$ npm install jpm -g

Then execute the command jpm xpi from the add-on's directory:

$ jpm xpi

This command will produce an .xpi file. You can simply drag and drop it on Firefox to install the Add-on.

== Copyright

Copyright (C) 2013 Guillaume Grossetie. Free use of this software is granted under the terms of the MIT License.

See the {license}[LICENSE] file for details.