㎝ Sub
Critic markup substitute

Script key: Critic markup substitute

Posted by wrk3

Install

Details

Label ㎝ Sub
Voice Over Critic markup substitute
Script
// Surround selection with Critic Markup substitute syntax, 
// or insert syntax if no selection.
// Cursor placed where substitution text can be written.

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

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

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus