Open the scripts directory. There are a couple ways to do this...
- Hit SHIFTSHIFT and select "Data Extractor", then choose "Go to Scripts Directory"
- In an existing query, choose the output format (CSV, HTML, TSV selector), then choose "Go to Scripts Directory"
Create a new file (Right Click -> New -> File) and name it Markdown-JavaScript.markdown.js
.
Paste the contents of Markdown-JavaScript.markdown.js
into this file.
Execute a query, select Markdown-JavaScript.markdown.js
from the output format dropdown, click the download icon and choose To File
or To Clipboard
.
This is based on the HTML-JavaScript.html.js
extractor which comes with DataGrip. Markdown escape logic taken from https://github.com/kemitchell/markdown-escape.js.