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

PropertyTypeDescription
actionsElHTMLElementContainer of actions for the view.
(Inherited from FileView)
allowNoFilebooleanWhether the view may be run without an attached file..
(Inherited from FileView)
backButtonElHTMLButtonElementBack button element for changing view history.
(Inherited from FileView)
canDropAnywherebooleanWhether the view may be dropped anywhere in workspace.
(Inherited from FileView)
contentElHTMLElementThe parent element of the content.
(Inherited from FileView)
filenull | TFileThe file that is currently being viewed.
(Inherited from FileView)
forwardButtonElHTMLButtonElementForward button element for changing view history.
(Inherited from FileView)
headerElHTMLElementHeader bar container of view.
(Inherited from FileView)
iconElHTMLElementIcon element for the view (for dragging).
(Inherited from FileView)
leftSidebarToggleElHTMLElement | nullToggle button for the left sidebar, shown on mobile. null on desktop.
(Inherited from FileView)
moreOptionsButtonElHTMLAnchorElementAnchor button for revealing more view actions.
(Inherited from FileView)
navigationbooleanWhether the file view can be navigated.
(Inherited from FileView)
titleContainerElHTMLElementContainer for the title of the view.
(Inherited from FileView)
titleElHTMLElementTitle element for the view.
(Inherited from FileView)
titleParentElHTMLElementTitle of the parent.
(Inherited from FileView)

Methods

MethodReturnsDescription
addAction(icon, title, callback)HTMLElementAdd an action to the item view.
(Inherited from FileView)
canAcceptExtension(extension)booleanWhether the file view can accept an extension.
(Inherited from FileView)
getDisplayText()stringGet 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()unknownGet view state for sync plugin.
(Inherited from FileView)
handleDrop(event, draggable, isOver)DropResult | nullHandle 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)voidCalled when a file is opened. Loads the file and requests a content update.
onGroupChange()voidHandle a linked group change event.
(Inherited from FileView)
onload()voidCalled when the file view is loaded.
(Inherited from FileView)
onLoadFile(file)Promise<void>Called when the file is loaded.
(Inherited from FileView)
onMoreOptions(event)voidHandle the 'more options' button click event.
(Inherited from FileView)
onMoreOptionsMenu(e)voidHandle 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)voidReceives sync state from another file view, opening the other view's file if it differs.
(Inherited from FileView)
renderBreadcrumbs()voidRender 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()voidUpdate the state of the back/forward navigation buttons.
(Inherited from FileView)

Links to this page: