Skip to content

ggrossetie/asciidoc-googledocs-addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AsciiDoc Processor Add-on for Google Docs™

Convert your Google Docs™ into AsciiDoc.

hedgehog light logo 1x

Usage

  1. Install extension from Google Workspace Marketplace

  2. Open a document or create a new one

  3. Under the Add-ons menu, click AsciiDoc Processor > Convert all to convert the entire document into AsciiDoc.

  4. Copy and paste the AsciiDoc output anywhere you want!

Note
To convert a part of your document, select some text and click AsciiDoc Processor > Convert selection

Supported text formats

This Add-on supports the following text formats :

  • Headings

  • Bold, italic, underline, subscript, superscript

  • Tables

  • Code bloc

  • Lists (unordered and ordered)

Development

As a Google Apps add-on, this project is written in JavaScript and HTML. The file app/Code.gs contains the JavaScript functions; app/Dialog.html is the template for calling the conversion functions and displaying the processed output.

Testing unpublished code

To safely test the code in your own Google Apps environment, create a new Google Apps project out of these files — or your modified versions! — then create and run test deployments using these simple steps.

  1. Inside a Google Doc, select Tools > Script editor…​.

    • A new tab will open for a blank project, with a Code.gs file already started.

  2. In the new tab, give your project a name, such as asciidoc-googledocs-addon-test, and click "Ok".

  3. Replace the entire body of Code.gs with the contents of app/Code.gs, and save.

  4. In the page menu, select File > New > HTML file.

  5. In the Create dialog, enter the filename Dialog.html, then "Ok".

  6. Replace the entire body of Dialog.html with the contents of app/Dialog.html, and save.

  7. In the page menu, select Publish > Test as addon.

  8. Under "Installation Config", select "Installed and Enabled".

  9. Click "Select Doc" and choose a Google Doc from your Drive.

  10. Under "Execute Saved Test", select the radio button to the left of your new test, then click "Test".

    • This will open your document in a new tab; your new test addon will be listed under Add-ons!

Help

If you discover errors or ommisions in the source code or documentation, please don’t hesitate to submit an issue or open a pull request with a fix.

Releases

No releases published

Sponsor this project

Packages

No packages published