Action

Send to BBEdit

Posted by agiletortoise, Last update 3 months ago

Launch BBEdit, create a new document and fill it’s content with the text of the current draft.

Steps

  • script (macOS only)

    let method = "openInBBEdit";
    let script = `on openInBBEdit(content)
    	tell application "BBEdit"
    		activate
    		set theWin to make new text window
    		set the contents of theWin's document to content
    	end tell
    end openInBBEdit
    `;
    
    let runner = AppleScript.create(script);
    if (!runner.execute(method, [draft.content])) {
    	console.log(runner.lastError);
    	context.fail();
    }
  • prompt (iOS only)

    promptKey
    prompt
    promptTitle
    iOS not supported
    promptMessage
    This action requires AppleScript and is only compatible with the Mac version of Drafts.
    promptButtons
    OK
    includeTextField
    false
    textFieldDefault
    includeCancelButton
    true

Options

  • After Success Default , Tags: debug
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.