Skip to content

FilePropertiesView

Unofficial

obsidian#View that displays frontmatter properties for the current file.

Import:

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

Signature:

export interface FilePropertiesView extends InfoFileView

Extends: InfoFileView

Constructor

new FilePropertiesView(leaf: WorkspaceLeaf, propertiesPluginInstance: PropertiesPluginInstance)

Constructor.

Properties

PropertyTypeDescription
modifyingFilenull | TFileThe file whose frontmatter the view is currently editing, or null when no supported file is loaded.

Methods

MethodReturnsDescription
getFile()TFileReturns the file.
getViewType()typeof ViewType.FilePropertiesGet the current view type.
isSupportedFile(file)booleanChecks the file is an markdown file.
onFileChange(file)Promise<unknown>Handle a file content change and refresh properties.
onFileOpen(file)voidCalled when a file is opened. Loads the file and requests a content update.
(Inherited from InfoFileView)
onQuickPreview(file, t)voidHandle a quick preview update for the file.
readSupportedFile(file)Promise<unknown>Reads the file if it is supported.
saveFrontmatter(e)voidSave the modified frontmatter data to the file.
shiftFocusAfter()voidMove focus to the next property field.
shiftFocusBefore()voidMove focus to the previous property field.
update()voidRefresh the file properties view.
updateEmptyState()voidUpdate the empty state display when no properties exist.
updateFrontmatter(file, t)unknownUpdate the frontmatter of a file with new property data.

Links to this page: