Releases: alzwded/GoogleAppsScriptExtensions
1.0
Google Apps Script Markdown tools
This addon provides two operations:
- Format Selected Markdown: select some markdown in a google doc, and it will convert it to proper google docs formatting to the best of its abilities
- Markdownify Formatted Selection: select some formatted text, and the tool will do a best effort replacement with equivalent markdown
Supports vanilla markdown, including:
- normal paragraphs, with inline bold, italic,
monospaced, links - code fences
- un/ordered lists, nested
- tables
The one obvious missing feature would be image blocks. Those get left alone.
Selection is a funny term. It doesn't exactly snap to the precise character the cursor is at, rather, it uses it as guidance as to which paragraphs/objects to transform into blocks of markdown. I.e. it snaps to the extents of a paragraph, or of a table, or of a list, you cannot "format from markdown" a single instance of **bolded text**, it has to be a whole block.
Installation
VBA macros style:
- Click Extensions -> Apps Script
- Copy the code from Code.gs and paste it in the Apps Script editor for Code.gs
- Hit save / CTRL+S
- Reload the Doc
- There is now a "Markdown Tools" menu.
At some point there will be a scareware screen about allowing "Unknown project" access to your Google Drive. The Unknown project is the thing you pasted, that is the project.
Alternatively, you can save this into a Google Apps Script on your drive and create a Test deployment targeting a google doc.
