ICellRenderer Interface#
Renders the input editor area and output display area of a cell. Each renderer is associated with a specific cell type.
public interface ICellRenderer : Verso.Abstractions.IExtension
Implements IExtension
Properties#
CellTypeId Property#
Identifier of the cell type this renderer handles, matching CellTypeId.
string CellTypeId { get; }
Property Value#
CollapsesInputOnExecute Property#
Indicates whether the cell's input editor should be collapsed (hidden) after
execution, showing only the rendered output. Clicking the output re-selects the
cell and reveals the editor. Defaults to false.
bool CollapsesInputOnExecute { get; }
Property Value#
DefaultVisibility Property#
Declares the cell type's visibility nature as a hint to layouts. Layouts may use this to decide whether to show, hide, or show only the output of cells of this type by default. Defaults to Content.
Verso.Abstractions.CellVisibilityHint DefaultVisibility { get; }
Property Value#
DisplayName Property#
Human-readable name for this renderer, shown in UI menus and settings.
string DisplayName { get; }
Property Value#
Methods#
GetEditorLanguage() Method#
Returns the editor language identifier (e.g. "markdown", "csharp") for syntax highlighting,
or null if the cell does not use a text editor.
string? GetEditorLanguage();
Returns#
System.String
An editor language identifier, or null.
RenderInputAsync(string, ICellRenderContext) Method#
Renders the input (editor) region of a cell from its source text.
System.Threading.Tasks.Task<Verso.Abstractions.RenderResult> RenderInputAsync(string source, Verso.Abstractions.ICellRenderContext context);
Parameters#
source System.String
The raw source content of the cell.
context ICellRenderContext
Rendering context providing theme, dimensions, and helper APIs.
Returns#
System.Threading.Tasks.Task<RenderResult>
A render result containing the visual representation of the cell input.
RenderOutputAsync(CellOutput, ICellRenderContext) Method#
Renders a single output produced by cell execution.
System.Threading.Tasks.Task<Verso.Abstractions.RenderResult> RenderOutputAsync(Verso.Abstractions.CellOutput output, Verso.Abstractions.ICellRenderContext context);
Parameters#
output CellOutput
The cell output to render.
context ICellRenderContext
Rendering context providing theme, dimensions, and helper APIs.
Returns#
System.Threading.Tasks.Task<RenderResult>
A render result containing the visual representation of the output.