Skip to content

TableCellEditor

Unofficial

obsidian#Editor for a single table cell, combining markdown editing with cell properties.

Import:

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

Signature:

export interface TableCellEditor extends MarkdownBaseView, TableCell

Extends: MarkdownBaseView, TableCell

Constructor

new TableCellEditor()

Constructor.

To extract the constructor type, use ExtractConstructor<Component>.

Properties

PropertyTypeDescription
_childrenComponent[]Child Components attached to current component, will be unloaded on unloading parent component.
(Inherited from MarkdownBaseView)
_eventsEventRef[]Events that are attached to the current component, will be detached on unloading parent component.
(Inherited from MarkdownBaseView)
_loadedbooleanWhether the component and its children are loaded.
(Inherited from MarkdownBaseView)
appAppReference to the app.
(Inherited from MarkdownBaseView)
cleanupLivePreview(() => void) | nullCallback to clear all elements.
(Inherited from MarkdownBaseView)
clipboardManagerClipboardManagerManager that handles pasting text, html and images into the editor.
(Inherited from MarkdownBaseView)
cmEditorViewCodemirror editor instance.
(Inherited from MarkdownBaseView)
cmInitbooleanWhether CodeMirror is initialized.
(Inherited from MarkdownBaseView)
colnumberColumn index of the cell.
(Inherited from TableCell)
containerElHTMLElementContainer element of the editor view.
(Inherited from MarkdownBaseView)
contentElHTMLElementElement containing the cell's content.
(Inherited from TableCell)
cursorPopupElHTMLElement | nullPopup element for internal link.
(Inherited from MarkdownBaseView)
dirtybooleanWhether the cell has been modified since the last save.
(Inherited from TableCell)
editor?EditorObsidian editor instance.
(Inherited from MarkdownBaseView)
editorElHTMLElementElement in which the CodeMirror editor resides.
(Inherited from MarkdownBaseView)
editorSuggestEditorSuggestsEditor suggester for autocompleting files, links, aliases, etc.
(Inherited from MarkdownBaseView)
elHTMLElementDOM element for the cell.
(Inherited from TableCell)
endnumberEnd offset of the cell content, relative to the start of the table.
(Inherited from TableCell)
livePreviewPluginExtension[]The CodeMirror plugins that handle the rendering of, and interaction with Obsidian's Markdown.
(Inherited from MarkdownBaseView)
localExtensionsExtension[]Local (always active) extensions for the editor.
(Inherited from MarkdownBaseView)
ownerMarkdownFileInfoController of the editor view.
(Inherited from MarkdownBaseView)
padEndnumberNumber of trailing padding spaces in the cell.
(Inherited from TableCell)
padStartnumberNumber of leading padding spaces in the cell.
(Inherited from TableCell)
rownumberRow index of the cell.
(Inherited from TableCell)
sourceModebooleanWhether live preview rendering is disabled.
(Inherited from MarkdownBaseView)
startnumberStart offset of the cell content, relative to the start of the table.
(Inherited from TableCell)
tableTableEditorTable widget that owns this cell.
(Inherited from TableCell)
tableCellnull | TableCellEditorReference to editor attached to table cell, if any.
(Inherited from MarkdownBaseView)
textstringText content of the cell, without padding.
(Inherited from TableCell)

Methods

MethodReturnsDescription
addChild(component)TAdds a child component, loading it if this component is loaded.
(Inherited from MarkdownBaseView)
applyFoldInfo(info)voidApply fold history to editor.
(Inherited from MarkdownBaseView)
buildLocalExtensions()Extension[]Constructs local (always active) extensions for the editor.
(Inherited from MarkdownBaseView)
clear()voidCleanup live preview, remove and then re-add all editor extensions.
(Inherited from MarkdownBaseView)
destroy()voidClean up live preview, remove all extensions, destroy editor.
(Inherited from MarkdownBaseView)
destroyTableCell(cell?)voidRemoves specified tablecell.
(Inherited from MarkdownBaseView)
editTableCell(cell, newCell)TableCellEditorEdit a specified table cell, creating a table cell editor.
(Inherited from MarkdownBaseView)
get()stringGet the current editor document as a string.
(Inherited from MarkdownBaseView)
getAbsoluteOffsets()TableCellOffsetsGet the offsets of the cell within the whole document.
(Inherited from TableCell)
getDynamicExtensions()Extension[]Constructs extensions for the editor based on user settings.
(Inherited from MarkdownBaseView)
getFoldInfo()FoldInfo | nullGet the current folds of the editor.
(Inherited from MarkdownBaseView)
getLength()numberGet the total length of the cell content including padding.
(Inherited from TableCell)
getLocalExtensions()unknownBuilds all local extensions and assigns to this.localExtensions.
(Inherited from MarkdownBaseView)
getTextWithPadding()stringGet the cell text with its leading and trailing padding spaces.
(Inherited from TableCell)
handleMobileCaretDrag(view, pointerId)voidHandle a mobile caret drag interaction for this cell.
(Inherited from TableCell)
init(el, start, end)voidInitialize the cell with a DOM element and its offsets within the table.
(Inherited from TableCell)
load()voidLoad this component and its children.
(Inherited from MarkdownBaseView)
lockDimensions()voidLock the cell's current dimensions to prevent layout reflow during operations.
(Inherited from TableCell)
onContextMenu(event, x)Promise<void>Creates menu on right mouse click.
(Inherited from MarkdownBaseView)
onEditorClick(event, element?)voidExecute click functionality on token on mouse click.
(Inherited from MarkdownBaseView)
onEditorDragStart(event)voidExecute drag functionality on drag start.
(Inherited from MarkdownBaseView)
onEditorLinkMouseover(event, target)voidExecute hover functionality on mouse over event.
(Inherited from MarkdownBaseView)
onload()voidOverride this to load your component.
(Inherited from MarkdownBaseView)
onMenu(event)voidExecute context menu functionality on right mouse click.
(Inherited from MarkdownBaseView)
onResize()voidReposition suggest and scroll position on resize.
(Inherited from MarkdownBaseView)
onunload()voidOverride this to unload your component
(Inherited from MarkdownBaseView)
onUpdate(update, changed)voidExecute functionality on CM editor state update.
(Inherited from MarkdownBaseView)
register(cb)voidRegisters a callback to be called when unloading.
(Inherited from MarkdownBaseView)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading.
(Inherited from MarkdownBaseView)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading
(Inherited from MarkdownBaseView)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading
(Inherited from MarkdownBaseView)
registerEvent(eventRef)voidRegisters an event to be detached when unloading.
(Inherited from MarkdownBaseView)
registerInterval(id)numberRegisters an interval (from setInterval) to be cancelled when unloading. Use window.setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API
(Inherited from MarkdownBaseView)
registerScopeEvent(keymapEventHandler)voidRegister a scope keymap event handler to be removed on unload.
(Inherited from MarkdownBaseView)
reinit()voidReinitialize the editor inside new container.
(Inherited from MarkdownBaseView)
removeChild(component)TRemoves a child component, unloading it.
(Inherited from MarkdownBaseView)
reparent(newContainer)voidMove the editor into the new container.
(Inherited from MarkdownBaseView)
resetSyntaxHighlighting()voidBodge to reset the syntax highlighting.
(Inherited from MarkdownBaseView)
saveHistory()voidSave history of file and data (for caching, for faster reopening of same file in editor).
(Inherited from MarkdownBaseView)
scrollIntoView()voidScroll the cell into the visible area of the editor.
(Inherited from TableCell)
set(data, clear)voidSet the state of the editor.
(Inherited from MarkdownBaseView)
setTextDir()voidSet the text direction of the cell based on its content.
(Inherited from TableCell)
toggleFoldFrontmatter()voidEnables/disables frontmatter folding.
(Inherited from MarkdownBaseView)
toggleSource()voidToggle source mode for editor and dispatch effect.
(Inherited from MarkdownBaseView)
triggerClickableToken(token, newLeaf)voidExecute functionality of token (open external link, open internal link in leaf, ...).
(Inherited from MarkdownBaseView)
unload()voidOverride this to unload your component.
(Inherited from MarkdownBaseView)
updateEvent()(update: ViewUpdate) => voidCallback for onUpdate functionality added as an extension.
(Inherited from MarkdownBaseView)
updateLinkPopup()voidIn mobile, creates a popover link on clickable token, if exists.
(Inherited from MarkdownBaseView)
updateOptions()voidReconfigure/re-add all the dynamic extensions.
(Inherited from MarkdownBaseView)
updateWidth(width)voidRecalculate the cell's padding for a target column width, honouring the column's alignment.
(Inherited from TableCell)

Links to this page: