Skip to content

PublishModal

Unofficial

The Publish changes dialog.

Import:

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

Signature:

export interface PublishModal extends Modal

Extends: Modal

Constructor

new PublishModal(app: App)

Constructor.

To get the constructor instance, use getModalConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
appAppThe Obsidian app instance.
(Inherited from Modal)
bgElHTMLElementBackground applied to application to dim it
(Inherited from Modal)
bgOpacitystringOpacity percentage of the background
(Inherited from Modal)
containerElHTMLElementThe container HTML element for the modal.
(Inherited from Modal)
contentElHTMLElementThe HTML element that represents the content of the modal.
(Inherited from Modal)
dimBackgroundbooleanWhether the background is being dimmed
(Inherited from Modal)
hasInitialInputFocusbooleanWhether the modal focuses its first input when opened.
(Inherited from Modal)
headerElHTMLDivElementHeader element of the modal dialog.
(Inherited from Modal)
isAnimatedbooleanWhether the current opening animates, set from Modal.canAnimate on each Modal.open; it also gates swipe-to-dismiss on the header.
(Inherited from Modal)
isOpenbooleanWhether the modal is currently open.
(Inherited from Modal)
modalElHTMLElementThe HTML element that represents the modal.
(Inherited from Modal)
pluginPublishPluginInstanceThe Publish plugin instance.
reviewChangesSectionPublishReviewChangesSectionThe review step, listing the changes to publish.
scopeScopeThe scope for the keymaps.
(Inherited from Modal)
selectionnull | WindowSelectionSelection logic handler
(Inherited from Modal)
shouldAnimateOpenbooleanWhether opening the modal should animate.
(Inherited from Modal)
shouldRestoreSelectionbooleanWhether the modal should restore the selection when it is opened or closed.
(Inherited from Modal)
titleElHTMLElementThe HTML element that represents the title of the modal.
(Inherited from Modal)
winnull | WindowReference to the global Window object.
(Inherited from Modal)

Methods

MethodReturnsDescription
animateClose()Promise<void>Performed when animation is complete
(Inherited from Modal)
animateOpen()Promise<void>Performed when animation is started
(Inherited from Modal)
canAnimate()booleanChecks whether this device supports modal animation.
(Inherited from Modal)
canDismiss()booleanChecks whether clicking outside may dismiss the modal.
(Inherited from Modal)
close()voidClose the modal.
(Inherited from Modal)
getRootEl()HTMLElementGets the modal's root element.
(Inherited from Modal)
onClickOutside(evt)voidCloses the modal when a click occurs outside of it, unless the event was already handled.
(Inherited from Modal)
onClose()voidCalled when the modal is closed.
(Inherited from Modal)
onEscapeKey()voidOn escape key press close modal
(Inherited from Modal)
onHistoryBack()voidCalled when the user navigates back in the history.
(Inherited from Modal)
onHistoryForward()voidCalled when the user navigates forward in the history.
(Inherited from Modal)
onOpen()Promise<void> | voidCalled when the modal is opened.
(Inherited from Modal)
onWindowClose()voidOn closing of the modal
(Inherited from Modal)
open()voidShow the modal on the the active window. On phones, the modal will animate on screen.
(Inherited from Modal)
openReviewChanges()Promise<void>Open the review step.
setBackgroundOpacity(opacity)thisSet the background opacity of the dimmed background.
(Inherited from Modal)
setCloseCallback(callback)thisSet the callback to be called when the modal is closed.
(Inherited from Modal)
setContent(content)thisSet the content of the modal.
(Inherited from Modal)
setDimBackground(dim)thisSet whether the background should be dimmed.
(Inherited from Modal)
setTitle(title)thisSet the title of the modal.
(Inherited from Modal)

Links to this page: