❝❞
Paste as Blockquote

Script key: Paste as Blockquote

Posted by @jpburt

Install

Details

Label ❝❞
Voice Over Paste as Blockquote
Script
// Insert clipboard contents as a markdown blockquote

var s = getClipboard();
var s = s.replace(/\n/g,'\n> ');

// add newlines before & after
var s = '\n> ' + s + '\n'; 

var no = s.length;
var selRange = getSelectedRange();
setSelectedText(s);
selRange=getSelectedRange();
setSelectedRange(selRange[0]+no,0);

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus