Skip to content

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 MarkdownScrollableEditView

Extends: MarkdownScrollableEditView

Properties

PropertyTypeDescription
cleanup(() => void) | nullFunction that cleans up the iframe and listeners.
cssClasses[]List of CSS classes applied to the editor.
(Inherited from MarkdownScrollableEditView)
iframeElHTMLIFrameElement | nullElement where the editor is embedded into.
isScrollingbooleanWhether the editor is currently scrolling.
(Inherited from MarkdownScrollableEditView)
scopeScope | undefinedobsidian#Scope for the search component, if exists.
(Inherited from MarkdownScrollableEditView)
searchEditorSearchComponentSearch component for the editor, provides highlight and search functionality.
(Inherited from MarkdownScrollableEditView)
sizerElHTMLElementContainer for the editor, handles editor size.
(Inherited from MarkdownScrollableEditView)

Methods

MethodReturnsDescription
applyScroll(scroll)voidSet the scroll count of the editor scrollbar.
(Inherited from MarkdownScrollableEditView)
buildLocalExtensions()Extension[]Constructs local (always active) extensions for the editor.
(Inherited from MarkdownScrollableEditView)
cleanupIframe()voidExecutes cleanup function if exists.
focus()voidFocus the editor (and for mobile: render keyboard).
(Inherited from MarkdownScrollableEditView)
getDynamicExtensions()Extension[]Constructs extensions for the editor based on user settings.
getScroll()numberGet the current scroll count of the editor scrollbar.
(Inherited from MarkdownScrollableEditView)
handleScroll()voidInvokes onMarkdownScroll on scroll.
(Inherited from MarkdownScrollableEditView)
hide()voidHides the editor (sets display: none).
(Inherited from MarkdownScrollableEditView)
onCssChange()voidClear editor cache and refreshes editor on app css change.
(Inherited from MarkdownScrollableEditView)
onIframeLoad()voidLoads the iframe element and prepare cleanup function.
onResize()voidUpdate editor size and bottom padding on resize.
(Inherited from MarkdownScrollableEditView)
onScroll()voidUpdate editor suggest position and invokes handleScroll on scroll.
(Inherited from MarkdownScrollableEditView)
onunload()voidExecute cleanup of the iframe.
onUpdate(update, changed)voidExecute functionality on CM editor state update.
onViewClick(event?)voidClose editor suggest and removes highlights on click.
(Inherited from MarkdownScrollableEditView)
setCssClass(classes)voidAdd classes to the editor, functions as a toggle.
(Inherited from MarkdownScrollableEditView)
show()voidReveal the editor (sets display: block).
(Inherited from MarkdownScrollableEditView)
showSearch(replace)voidReveal the search (and replace) component.
(Inherited from MarkdownScrollableEditView)
updateBottomPadding(height)voidUpdate the bottom padding of the CodeMirror contentdom.
(Inherited from MarkdownScrollableEditView)

Links to this page: