✪ ~~

Script key

Posted by Anton Ivanovich

Install

Details

Label ✪ ~~
Voice Over
Script
// Script keys run short Javascripts
// For documentation and examples, visit:
// http://help.agiletortoise.com

// Apply Markdown strikethrough lines

var sel = getSelectedText();
var selRange = getSelectedRange();

if (!sel || sel.length == 0) {
  setSelectedText("~~");
  setSelectedRange(selRange[0]+1,0);
}
else {
  setSelectedText("~~"+sel+"~~");
  setSelectedRange(selRange[0]+selRange[1]+2,0);
}

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus