IFramedMarkdownEditor
Unofficial
A markdown editor that runs inside an iframe, used for embedded editable views.
Import:
import type { IFramedMarkdownEditor } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface IFramedMarkdownEditor extends MarkdownScrollableEditViewExtends: MarkdownScrollableEditView
Properties
| Property | Type | Description | |
|---|---|---|---|
| cleanup | (() => void) | null | Function that cleans up the iframe and listeners. | |
| cssClasses | [] | List of CSS classes applied to the editor. (Inherited from MarkdownScrollableEditView) | |
| iframeEl | HTMLIFrameElement | null | Element where the editor is embedded into. | |
| isScrolling | boolean | Whether the editor is currently scrolling. (Inherited from MarkdownScrollableEditView) | |
| scope | Scope | undefined | obsidian#Scope for the search component, if exists.(Inherited from MarkdownScrollableEditView) | |
| search | EditorSearchComponent | Search component for the editor, provides highlight and search functionality. (Inherited from MarkdownScrollableEditView) | |
| sizerEl | HTMLElement | Container for the editor, handles editor size. (Inherited from MarkdownScrollableEditView) |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| applyScroll(scroll) | void | Set the scroll count of the editor scrollbar. (Inherited from MarkdownScrollableEditView) | |
| buildLocalExtensions() | Extension[] | Constructs local (always active) extensions for the editor. (Inherited from MarkdownScrollableEditView) | |
| cleanupIframe() | void | Executes cleanup function if exists. | |
| focus() | void | Focus the editor (and for mobile: render keyboard). (Inherited from MarkdownScrollableEditView) | |
| getDynamicExtensions() | Extension[] | Constructs extensions for the editor based on user settings. | |
| getScroll() | number | Get the current scroll count of the editor scrollbar. (Inherited from MarkdownScrollableEditView) | |
| handleScroll() | void | Invokes onMarkdownScroll on scroll. (Inherited from MarkdownScrollableEditView) | |
| hide() | void | Hides the editor (sets display: none). (Inherited from MarkdownScrollableEditView) | |
| onCssChange() | void | Clear editor cache and refreshes editor on app css change. (Inherited from MarkdownScrollableEditView) | |
| onIframeLoad() | void | Loads the iframe element and prepare cleanup function. | |
| onResize() | void | Update editor size and bottom padding on resize. (Inherited from MarkdownScrollableEditView) | |
| onScroll() | void | Update editor suggest position and invokes handleScroll on scroll. (Inherited from MarkdownScrollableEditView) | |
| onunload() | void | Execute cleanup of the iframe. | |
| onUpdate(update, changed) | void | Execute functionality on CM editor state update. | |
| onViewClick(event?) | void | Close editor suggest and removes highlights on click. (Inherited from MarkdownScrollableEditView) | |
| setCssClass(classes) | void | Add classes to the editor, functions as a toggle. (Inherited from MarkdownScrollableEditView) | |
| show() | void | Reveal the editor (sets display: block). (Inherited from MarkdownScrollableEditView) | |
| showSearch(replace) | void | Reveal the search (and replace) component. (Inherited from MarkdownScrollableEditView) | |
| updateBottomPadding(height) | void | Update the bottom padding of the CodeMirror contentdom. (Inherited from MarkdownScrollableEditView) |
Links to this page: