PublishModal
Unofficial
The Publish changes dialog.
Import:
import type { PublishModal } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface PublishModal extends ModalExtends: Modal
Constructor
new PublishModal(app: App)Constructor.
To get the constructor instance, use getModalConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| app | App | The Obsidian app instance. (Inherited from Modal) | |
| bgEl | HTMLElement | Background applied to application to dim it (Inherited from Modal) | |
| bgOpacity | string | Opacity percentage of the background (Inherited from Modal) | |
| containerEl | HTMLElement | The container HTML element for the modal. (Inherited from Modal) | |
| contentEl | HTMLElement | The HTML element that represents the content of the modal. (Inherited from Modal) | |
| dimBackground | boolean | Whether the background is being dimmed (Inherited from Modal) | |
| hasInitialInputFocus | boolean | Whether the modal focuses its first input when opened. (Inherited from Modal) | |
| headerEl | HTMLDivElement | Header element of the modal dialog. (Inherited from Modal) | |
| isAnimated | boolean | Whether the current opening animates, set from Modal.canAnimate on each Modal.open; it also gates swipe-to-dismiss on the header. (Inherited from Modal) | |
| isOpen | boolean | Whether the modal is currently open. (Inherited from Modal) | |
| modalEl | HTMLElement | The HTML element that represents the modal. (Inherited from Modal) | |
| plugin | PublishPluginInstance | The Publish plugin instance. | |
| reviewChangesSection | PublishReviewChangesSection | The review step, listing the changes to publish. | |
| scope | Scope | The scope for the keymaps. (Inherited from Modal) | |
| selection | null | WindowSelection | Selection logic handler (Inherited from Modal) | |
| shouldAnimateOpen | boolean | Whether opening the modal should animate. (Inherited from Modal) | |
| shouldRestoreSelection | boolean | Whether the modal should restore the selection when it is opened or closed. (Inherited from Modal) | |
| titleEl | HTMLElement | The HTML element that represents the title of the modal. (Inherited from Modal) | |
| win | null | Window | Reference to the global Window object. (Inherited from Modal) |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| animateClose() | Promise<void> | Performed when animation is complete (Inherited from Modal) | |
| animateOpen() | Promise<void> | Performed when animation is started (Inherited from Modal) | |
| canAnimate() | boolean | Checks whether this device supports modal animation. (Inherited from Modal) | |
| canDismiss() | boolean | Checks whether clicking outside may dismiss the modal. (Inherited from Modal) | |
| close() | void | Close the modal. (Inherited from Modal) | |
| getRootEl() | HTMLElement | Gets the modal's root element. (Inherited from Modal) | |
| onClickOutside(evt) | void | Closes the modal when a click occurs outside of it, unless the event was already handled. (Inherited from Modal) | |
| onClose() | void | Called when the modal is closed. (Inherited from Modal) | |
| onEscapeKey() | void | On escape key press close modal (Inherited from Modal) | |
| onHistoryBack() | void | Called when the user navigates back in the history. (Inherited from Modal) | |
| onHistoryForward() | void | Called when the user navigates forward in the history. (Inherited from Modal) | |
| onOpen() | Promise<void> | void | Called when the modal is opened. (Inherited from Modal) | |
| onWindowClose() | void | On closing of the modal (Inherited from Modal) | |
| open() | void | Show 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) | this | Set the background opacity of the dimmed background. (Inherited from Modal) | |
| setCloseCallback(callback) | this | Set the callback to be called when the modal is closed. (Inherited from Modal) | |
| setContent(content) | this | Set the content of the modal. (Inherited from Modal) | |
| setDimBackground(dim) | this | Set whether the background should be dimmed. (Inherited from Modal) | |
| setTitle(title) | this | Set the title of the modal. (Inherited from Modal) |
Links to this page: