clearFormatting method
void
clearFormatting()
Clears formatting on the current selection.
Implementation
void clearFormatting() {
final blockIndex = _editorWidgetState?.focusedBlockIndex ?? 0;
final selection = _editorWidgetState?.selection;
if (selection == null || selection.isCollapsed) return;
final info = focusedTableInfo;
if (info != null) {
_documentController.clearCellFormat(
info.blockIndex, info.row, info.col, selection.start, selection.end);
} else {
_documentController.clearFormat(
blockIndex, selection.start, selection.end);
}
_editorWidgetState?.rebuild();
}