Action
switch
Inserts switch sample template
Note! Use with ‘insert.js’ library.
Steps
-
script
// use insert.js // RV 2020-03-10 at 18:37 const code = `switch ('value') { case 'value': break; case 'value2': break; default: app.displayErrorMessage('switch/case not implemented!'); break; } ` let = moveCaret = 8; let = selLength = 7; // Include from Drafts iCloud Drive '/Library/Scripts/insert.js': require('insert.js') // Inserts code and keeps indents: insert(code, moveCaret, selLength);
Options
-
After Success Default Notification Error Log Level Error
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.