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 EmptyViewExtends: EmptyView
Constructor
new UnknownView(leaf: WorkspaceLeaf)Constructor.
To extract the constructor type, use ExtractConstructor<ItemView>.
Properties
| Property | Type | Description | |
|---|---|---|---|
| actionListEl | HTMLDivElement | Container for the new-tab actions. (Inherited from EmptyView) | |
| actionsEl | HTMLElement | Container of actions for the view. (Inherited from EmptyView) | |
| app | App | The Obsidian app instance. (Inherited from EmptyView) | |
| backButtonEl | HTMLButtonElement | Back button element for changing view history. (Inherited from EmptyView) | |
| canDropAnywhere | boolean | Whether the view may be dropped anywhere in workspace. (Inherited from EmptyView) | |
| clickableAreaEl | HTMLDivElement | Interactive empty-state container. (Inherited from EmptyView) | |
| containerEl | HTMLElement | The container HTML element for the component. (Inherited from EmptyView) | |
| contentEl | HTMLElement | The parent element of the content. (Inherited from EmptyView) | |
| emptyStateEl | HTMLDivElement | Outer empty-state container. (Inherited from EmptyView) | |
| emptyTitleEl | HTMLDivElement | Empty-state title element. (Inherited from EmptyView) | |
| forwardButtonEl | HTMLButtonElement | Forward button element for changing view history. (Inherited from EmptyView) | |
| headerEl | HTMLElement | Header bar container of view. (Inherited from EmptyView) | |
| icon | IconName | The icon of the view. (Inherited from EmptyView) | |
| iconEl | HTMLElement | Icon element for the view (for dragging). (Inherited from EmptyView) | |
| leaf | WorkspaceLeaf | The leaf of the view. (Inherited from EmptyView) | |
| leftSidebarToggleEl | HTMLElement | null | Toggle button for the left sidebar, shown on mobile. null on desktop.(Inherited from EmptyView) | |
| moreOptionsButtonEl | HTMLAnchorElement | Anchor button for revealing more view actions. (Inherited from EmptyView) | |
| navigation | boolean | Whether 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) | |
| scope | null | Scope | Assign an optional scope to your view to register hotkeys for when the view is in focus. (Inherited from EmptyView) | |
| titleContainerEl | HTMLElement | Container for the title of the view. (Inherited from EmptyView) | |
| titleEl | HTMLElement | Title element for the view. (Inherited from EmptyView) | |
| titleParentEl | HTMLElement | Title of the parent. (Inherited from EmptyView) |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| addAction(icon, title, callback) | HTMLElement | Add an action to the item view. (Inherited from EmptyView) | |
| close() | Promise<void> | Closes the view. (Inherited from EmptyView) | |
| getDisplayText() | string | Get the display text of the view. (Inherited from EmptyView) | |
| getEphemeralState() | Record<string, unknown> | Get the ephemeral state of the view. (Inherited from EmptyView) | |
| getIcon() | IconName | Get the icon of the view. (Inherited from EmptyView) | |
| getSideTooltipPlacement() | 'left' | 'right' | undefined | Returns the placement of the tooltip. (Inherited from EmptyView) | |
| getState() | Record<string, unknown> | Get the state of the view. (Inherited from EmptyView) | |
| getViewType() | typeof ViewType.Empty | Get the current view type. (Inherited from EmptyView) | |
| handleCopy($event) | void | Handle copy event on metadata editor and serialize properties. (Inherited from EmptyView) | |
| handleCut($event) | void | Handle cut event on metadata editor and serialize and remove properties. (Inherited from EmptyView) | |
| handleDrop($event, draggable, isOver) | DropResult | null | Handle a drop event on this view. (Inherited from EmptyView) | |
| handlePaste($event) | void | Handle paste event of properties on metadata editor. (Inherited from EmptyView) | |
| onClose() | Promise<void> | Called when the view is closed. (Inherited from EmptyView) | |
| onGroupChange() | void | Handle a linked group change event. (Inherited from EmptyView) | |
| onHeaderMenu(e) | void | Called when the header context menu is triggered. (Inherited from EmptyView) | |
| onMoreOptions($event) | void | Handle the 'more options' button click event. (Inherited from EmptyView) | |
| onMoreOptionsMenu(e) | void | Handle the 'more options' context menu event. (Inherited from EmptyView) | |
| onOpen() | Promise<void> | Called when the view is opened. (Inherited from EmptyView) | |
| onPaneMenu(menu, source) | void | Populates the pane menu. (Replaces the previously removed onHeaderMenu and onMoreOptionsMenu)(Inherited from EmptyView) | |
| onResize() | void | Called when the size of this view is changed. (Inherited from EmptyView) | |
| onTabMenu(menu) | void | Adds the menu items to the menu. (Inherited from EmptyView) | |
| open(parentEl) | Promise<void> | Opens the view. (Inherited from EmptyView) | |
| setEphemeralState(state) | void | Set the ephemeral state of the view. (Inherited from EmptyView) | |
| setState(state, result) | Promise<void> | Set the state of the view. (Inherited from EmptyView) | |
| updateActions() | void | Rebuild the new-tab actions in EmptyView.actionListEl: new note, and new base, new canvas, go to file and open web viewer where the plugin or vault allows them. Runs on open and whenever an internal plugin changes. (Inherited from EmptyView) | |
| updateNavButtons() | void | Update the state of the back/forward navigation buttons. (Inherited from EmptyView) |