-
Notifications
You must be signed in to change notification settings - Fork 0
ICellWriter
Dustin Horne edited this page Mar 5, 2026
·
1 revision
Namespace: ParentElement.RichText.Core.Tables
Write-only abstraction for populating a table cell's content programmatically. Instances of ICellWriter are provided by InlineTable.WriteToCell and are only valid for the duration of the populate callback.
public interface ICellWriter| Method | Returns | Description |
|---|---|---|
Insert(string) |
void |
Insert raw text at the current caret position |
ApplyStyle(IStyle) |
void |
Set the character style for subsequent Insert calls |
ApplyAlignment(TextAlignment) |
void |
Set the paragraph alignment of the current paragraph |
ApplyListFormat(ListType, int) |
void |
Apply a list type and nesting level directly |
SetBlockIndent(float) |
void |
Set the left block indent of the current paragraph in pixels |
AdjustLineSpacing(float) |
void |
Set the line-height multiplier for the current paragraph |
InsertInlineImage(SKImage, float, float) |
void |
Insert an inline image at the current caret position |
ICellWriter is obtained exclusively through InlineTable.WriteToCell:
var table = editor.InsertTable(new TableOptions { Rows = 2, Columns = 3 });
table.WriteToCell(0, 0, writer =>
{
writer.ApplyStyle(boldStyle);
writer.Insert("Header");
});
table.WriteToCell(1, 0, writer =>
{
writer.Insert("Row 1, Col 1");
});See also: Tables · IDocumentController