Google Apps Scripts to create a markdown file from the Google Doc.
To add the code to a Google Doc, perform the following actions.
- Select the "Tools/Script Editor" menu item to open the Script Editor.
- Select the "File/New/Script file" menu item to create a new script file.
- Enter "main" as the new file name.
- Replace the contents of the editor window with the contents of the "main.gs" file here.
- Repeat steps 2-4 for the "local.gs" script file.
- Select the drop-down menu of the "Code.gs" script file and select "Delete" to remove it.
- Select the "File/Save all" menu item to save the new script files.
- Select the name of the script project and rename it to "Markdown".
- Switch back to the main Google Doc file and reload the page.
Select the "Add-ons/Markdown/Add MD to Drive" menu item.