API reference / Common / Engine types / TextOutcome
Type Alias: TextOutcome
ts
type TextOutcome =
| {
textReplaced: {
inserted: {
start: TextStoryOffset;
end: TextStoryOffset;
};
struck: {
start: TextStoryOffset;
end: TextStoryOffset;
};
deleted: TextLength;
};
}
| {
textPropertiesUpdated: {
range: {
start: TextStoryOffset;
end: TextStoryOffset;
};
};
}
| {
textMarkupUpdated: {
range: {
start: TextStoryOffset;
end: TextStoryOffset;
};
};
}
| {
revisionsSettled: {
ids: RawId[];
};
}
| {
drawingReordered: {
offset: TextStoryOffset;
};
}
| {
tableEdited: {
offset: TextStoryOffset;
outcome: TableOutcome;
};
}
| {
drawingEdited: {
offset: TextStoryOffset;
outcome: TextDrawingOutcome;
};
};What a TextCommand did to a story — the command's twin of the engine facet's TextChange, one level up: a fact about the story, never a selection.
Text has no ids, so it is named by its range, in the story as the command left it, and a slot in it by its offset. A variant names what happened, not which command ran: every format is TextPropertiesUpdated, every wrap, unwrap and comment range TextMarkupUpdated.