js HELP
List of Drafts .js methods, with notes

Script key: List of Drafts .js methods, with notes

Posted by @complexpoint

Install

Details

Label js HELP
Voice Over List of Drafts .js methods, with notes
Script
setClipboard(
	'## Editing commands available in Drafts .js scripts\n' +
	'*To reuse scripts in FoldingText, 1Writer, Script Editor etc,*\n' +
	'*start with the following one-line header,*\n    \n' + 
    '    var drafts = this;\n    \n' +
	'*and use the `drafts.` prefix with the commands below*\n\n' +
	'*For the compatibility headers to use in the other apps,*\n' +
	'See [this thread](http://support.foldingtext.com/t/writing-scripts-which-run-on-both-foldingtext-and-ios-drafts-4/652/8)\n\n' +
	'*Note: the ranges expected & returned are [intStart, intLength]*\n' +
	'- ' +
	Object.keys(
		this
	).join('()\n- drafts.') + '()'
)
alert("Notes and list of .js methods copied to clipboard");

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus