Action

Refresh Theme or Syntax

Posted by sylumer, Last update over 2 years ago

Refresh Drafts’s current theme and syntax.

See https://www.thoughtasylum.com/2021/10/24/drafts-syntax-development-tip/ for details.

Steps

  • script

    // Toggle workspaces --> Reapply theme
    app.applyWorkspace(Workspace.find("_ThemeSyntaxSwitch"));
    app.applyWorkspace(Workspace.find("_ThemeSyntaxDev"));
    
    // Toggle draft --> Reapply syntax
    let dNew = Draft.create();
    dNew.update();
    editor.load(dNew);
    editor.load(draft);

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.