Skip to content

UnknownView

Unofficial

Views of plugins that have been deactivated become an UnknownView.

This is probably not the right term.

Import:

import type { UnknownView } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface UnknownView extends EmptyView

Extends: EmptyView

Constructor

new UnknownView(leaf: WorkspaceLeaf)

Constructor.

To extract the constructor type, use ExtractConstructor<ItemView>.

Properties

PropertyTypeDescription
actionsElHTMLElementContainer of actions for the view.
(Inherited from EmptyView)
appAppThe Obsidian app instance.
(Inherited from EmptyView)
backButtonElHTMLButtonElementBack button element for changing view history.
(Inherited from EmptyView)
canDropAnywherebooleanWhether the view may be dropped anywhere in workspace.
(Inherited from EmptyView)
closeablebooleanWhether the leaf may close the view.
(Inherited from EmptyView)
containerElHTMLElementThe container HTML element for the component.
(Inherited from EmptyView)
contentElHTMLElementThe parent element of the content.
(Inherited from EmptyView)
forwardButtonElHTMLButtonElementForward button element for changing view history.
(Inherited from EmptyView)
headerElHTMLElementHeader bar container of view.
(Inherited from EmptyView)
iconIconNameThe icon of the view.
(Inherited from EmptyView)
iconElHTMLElementIcon element for the view (for dragging).
(Inherited from EmptyView)
leafWorkspaceLeafThe leaf of the view.
(Inherited from EmptyView)
leftSidebarToggleElHTMLElement | nullToggle button for the left sidebar, shown on mobile. null on desktop.
(Inherited from EmptyView)
moreOptionsButtonElHTMLAnchorElementAnchor button for revealing more view actions.
(Inherited from EmptyView)
navigationbooleanWhether or not the view is intended for navigation. If your view is a static view that is not intended to be navigated away, set this to false. (For example: File explorer, calendar, etc.) If your view opens a file or can be otherwise navigated, set this to true. (For example: Markdown editor view, Kanban view, PDF view, etc.)
(Inherited from EmptyView)
scopenull | ScopeAssign an optional scope to your view to register hotkeys for when the view is in focus.
(Inherited from EmptyView)
titleContainerElHTMLElementContainer for the title of the view.
(Inherited from EmptyView)
titleElHTMLElementTitle element for the view.
(Inherited from EmptyView)
titleParentElHTMLElementTitle of the parent.
(Inherited from EmptyView)

Methods

MethodReturnsDescription
addAction(icon, title, callback)HTMLElementAdd an action to the item view.
(Inherited from EmptyView)
close()Promise<void>Closes the view.
(Inherited from EmptyView)
getDisplayText()stringGet the display text of the view.
(Inherited from EmptyView)
getEphemeralState()Record<string, unknown>Get the ephemeral state of the view.
(Inherited from EmptyView)
getIcon()IconNameGet the icon of the view.
(Inherited from EmptyView)
getSideTooltipPlacement()'left' | 'right' | undefinedReturns the placement of the tooltip.
(Inherited from EmptyView)
getState()Record<string, unknown>Get the state of the view.
(Inherited from EmptyView)
getViewType()typeof ViewType.EmptyGet the current view type.
(Inherited from EmptyView)
handleCopy(event)voidHandle copy event on metadata editor and serialize properties.
(Inherited from EmptyView)
handleCut(event)voidHandle cut event on metadata editor and serialize and remove properties.
(Inherited from EmptyView)
handleDrop(event, draggable, isOver)DropResult | nullHandle a drop event on this view.
(Inherited from EmptyView)
handlePaste(event)voidHandle paste event of properties on metadata editor.
(Inherited from EmptyView)
onClose()Promise<void>Called when the view is closed.
(Inherited from EmptyView)
onGroupChange()voidHandle a linked group change event.
(Inherited from EmptyView)
onHeaderMenu(e)voidCalled when the header context menu is triggered.
(Inherited from EmptyView)
onMoreOptions(event)voidHandle the 'more options' button click event.
(Inherited from EmptyView)
onMoreOptionsMenu(e)voidHandle the 'more options' context menu event.
(Inherited from EmptyView)
onOpen()Promise<void>Called when the view is opened.
(Inherited from EmptyView)
onPaneMenu(menu, source)voidPopulates the pane menu.

(Replaces the previously removed onHeaderMenu and onMoreOptionsMenu)
(Inherited from EmptyView)
onResize()voidCalled when the size of this view is changed.
(Inherited from EmptyView)
onTabMenu(menu)voidAdds the menu items to the menu.
(Inherited from EmptyView)
open(parentEl)Promise<void>Opens the view.
(Inherited from EmptyView)
setEphemeralState(state)voidSet the ephemeral state of the view.
(Inherited from EmptyView)
setState(state, result)Promise<void>Set the state of the view.
(Inherited from EmptyView)
updateNavButtons()voidUpdate the state of the back/forward navigation buttons.
(Inherited from EmptyView)