MarkdownView

MarkdownView class

Signature:

export class MarkdownView extends TextFileView implements MarkdownFileInfo 

Extends: TextFileView

Implements: MarkdownFileInfo

Constructors

ConstructorModifiersDescription
(constructor)(leaf)Constructs a new instance of the MarkdownView class

Properties

PropertyModifiersTypeDescription
allowNoFileboolean

(Inherited from FileView)

appApp

(Inherited from View)

containerElHTMLElement

(Inherited from View)

contentElHTMLElement

(Inherited from ItemView)

currentModeMarkdownSubView
datastring

In memory data

(Inherited from TextFileView)

editorEditor
fileTFile | null

(Inherited from FileView)

hoverPopoverHoverPopover | null
iconIconName

(Inherited from View)

leafWorkspaceLeaf

(Inherited from View)

navigationboolean

File views can be navigated by default.

(Inherited from FileView)

previewModeMarkdownPreviewView
requestSave() โ‡’ void

Debounced save in 2 seconds from now

(Inherited from TextFileView)

scopeScope | null

Assign an optional scope to your view to register hotkeys for when the view is in focus.

(Inherited from View)

Methods

MethodModifiersDescription
addAction(icon, title, callback)

(Inherited from ItemView)

addChild(component)

Adds a child component, loading it if this component is loaded

(Inherited from Component)

canAcceptExtension(extension)

(Inherited from FileView)

clear()
getDisplayText()

(Inherited from FileView)

getEphemeralState()

(Inherited from View)

getIcon()

(Inherited from View)

getMode()
getState()

(Inherited from FileView)

getViewData()
getViewType()
load()

Load this component and its children

(Inherited from Component)

onClose()protected

(Inherited from View)

onload()

(Inherited from FileView)

onLoadFile(file)

(Inherited from TextFileView)

onOpen()protected

(Inherited from View)

onPaneMenu(menu, source)

Populates the pane menu.

(Replaces the previously removed onHeaderMenu and onMoreOptionsMenu)

(Inherited from View)

onRename(file)

(Inherited from FileView)

onResize()

Called when the size of this view is changed.

(Inherited from View)

onunload()

Override this to unload your component

(Inherited from Component)

onUnloadFile(file)

(Inherited from TextFileView)

register(cb)

Registers a callback to be called when unloading

(Inherited from Component)

registerDomEvent(el, type, callback, options)

Registers an DOM event to be detached when unloading

(Inherited from Component)

registerDomEvent(el, type, callback, options)

Registers an DOM event to be detached when unloading

(Inherited from Component)

registerDomEvent(el, type, callback, options)

Registers an DOM event to be detached when unloading

(Inherited from Component)

registerEvent(eventRef)

Registers an event to be detached when unloading

(Inherited from Component)

registerInterval(id)

Registers an interval (from setInterval) to be cancelled when unloading Use instead of to avoid TypeScript confusing between NodeJS vs Browser API

(Inherited from Component)

removeChild(component)

Removes a child component, unloading it

(Inherited from Component)

save(clear)

(Inherited from TextFileView)

setEphemeralState(state)

(Inherited from View)

setState(state, result)

(Inherited from FileView)

setViewData(data, clear)
showSearch(replace)
unload()

Unload this component and its children

(Inherited from Component)