Skip to content

OpenSettingsCommandHandler

A command handler that opens the settings tab for a plugin.

Import:

import { OpenSettingsCommandHandler } from 'obsidian-dev-utils/obsidian/command-handlers/open-settings-command-handler';

Signature:

export class OpenSettingsCommandHandler extends GlobalCommandHandler

Extends: GlobalCommandHandler

Constructor

new OpenSettingsCommandHandler(params: OpenSettingsCommandHandlerConstructorParams)

Constructs a new instance.

Properties

PropertyTypeDescription
appAppThe Obsidian app instance.
iconIconNameThe icon for the command.
(Inherited from GlobalCommandHandler)
idstringThe ID of the command.
(Inherited from GlobalCommandHandler)
namestringThe display name of the command.
(Inherited from GlobalCommandHandler)
settingTabSettingTabThe setting tab to open.

Methods

MethodReturnsDescription
buildCommand()CommandBuilds a plain Obsidian Command object with a checkCallback.
(Inherited from GlobalCommandHandler)
canExecute()booleanChecks whether the command can currently execute.
(Inherited from GlobalCommandHandler)
execute()voidExecutes the command.
onRegistered(context)Promise<void>Called after the command has been registered with Obsidian. Subclasses use the provided context to register menu event handlers.
(Inherited from GlobalCommandHandler)

Links to this page: