Action

toggle pinning mode

Posted by FlohGro, Last update over 1 year ago

created by @FlohGro / more on my Blog

toggle pinning mode

This action toggles the pinning mode of Drafts editor

[Configuration]

no configuration needed

[Usage]

This action is most efficient if you assign a keyboard shortcut to it and / or add it to the action bar above your keyboard. If you want to toggle the pinning mode just press the keyboard shortcut and pinning will be enabled / disabled depending on the current state.


If you find this useful and want to support me you can

Buy Me A Coffee

Steps

  • script

    // toggle modes 
    
    let isPinningEnabled = () => {
      if (editor.pinningEnabled == true) {
        return true;
      } else {
        return false;
      }
    }
    
    let enablePinningMode = () => {
      editor.pinningEnabled = true;
    }
    
    let disablePinningMode = () => {
      editor.pinningEnabled = false;
    }
    
    
    if (isPinningEnabled() == true) {
    	disablePinningMode()
    } else {
    	enablePinningMode()
    }

Options

  • After Success Nothing
    Notification None
    Log Level Error
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.