Skip to content

InfoFileView

Unofficial

Info file view.

This is probably not the right term.

Import:

import type { InfoFileView } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface InfoFileView extends FileView

Extends: FileView

Constructor

new InfoFileView(leaf: WorkspaceLeaf)

Constructor.

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

Properties

Property Type Description
actionsEl HTMLElement Container of actions for the view.
(Inherited from FileView)
allowNoFile boolean Whether the view may be run without an attached file..
(Inherited from FileView)
backButtonEl HTMLButtonElement Back button element for changing view history.
(Inherited from FileView)
canDropAnywhere boolean Whether the view may be dropped anywhere in workspace.
(Inherited from FileView)
contentEl HTMLElement The parent element of the content.
(Inherited from FileView)
file null | TFile The file that is currently being viewed.
(Inherited from FileView)
forwardButtonEl HTMLButtonElement Forward button element for changing view history.
(Inherited from FileView)
headerEl HTMLElement Header bar container of view.
(Inherited from FileView)
iconEl HTMLElement Icon element for the view (for dragging).
(Inherited from FileView)
leftSidebarToggleEl HTMLElement | null Toggle button for the left sidebar, shown on mobile. null on desktop.
(Inherited from FileView)
moreOptionsButtonEl HTMLAnchorElement Anchor button for revealing more view actions.
(Inherited from FileView)
navigation boolean Whether the file view can be navigated.
(Inherited from FileView)
titleContainerEl HTMLElement Container for the title of the view.
(Inherited from FileView)
titleEl HTMLElement Title element for the view.
(Inherited from FileView)
titleParentEl HTMLElement Title of the parent.
(Inherited from FileView)

Methods

Method Returns Description
addAction(icon, title, callback) HTMLElement Add an action to the item view.
(Inherited from FileView)
canAcceptExtension(extension) boolean Whether the file view can accept an extension.
(Inherited from FileView)
getDisplayText() string Get the display text for the file view.
(Inherited from FileView)
getState() Record<string, unknown> Get the state of the file view.
(Inherited from FileView)
getSyncViewState() unknown Get view state for sync plugin.
(Inherited from FileView)
handleDrop(event, draggable, isOver) DropResult | null Handle a drop event on this view.
(Inherited from FileView)
loadFile(file) Promise<unknown> Loads the file with the onLoadFile function.
(Inherited from FileView)
onDelete(file) Promise<void> Updates the view if it contains the deleted file.
(Inherited from FileView)
onFileOpen(file) void Called when a file is opened. Loads the file and requests a content update.
onGroupChange() void Handle a linked group change event.
(Inherited from FileView)
onload() void Called when the file view is loaded.
(Inherited from FileView)
onLoadFile(file) Promise<void> Called when the file is loaded.
(Inherited from FileView)
onMoreOptions(event) void Handle the 'more options' button click event.
(Inherited from FileView)
onMoreOptionsMenu(e) void Handle the 'more options' context menu event.
(Inherited from FileView)
onRename(file) Promise<void> Called when the file is renamed.
(Inherited from FileView)
onUnloadFile(file) Promise<void> Called when the file is unloaded.
(Inherited from FileView)
receiveSyncState(view) void Receives sync state from another file view, opening the other view's file if it differs.
(Inherited from FileView)
renderBreadcrumbs() void Render the breadcrumb navigation for this file view.
(Inherited from FileView)
setState(state, result) Promise<void> Set the state of the file view.
(Inherited from FileView)
syncState(e) Promise<unknown> Synchronize the view state with the sync plugin.
(Inherited from FileView)
updateNavButtons() void Update the state of the back/forward navigation buttons.
(Inherited from FileView)

Links to this page: