clearFormatting method

void clearFormatting()

Remove every inline attribute over the current selection.

Implementation

void clearFormatting() {
  final TextSelection sel = selection;
  pending.clear();
  if (!sel.isValid || sel.isCollapsed) {
    notifyListeners();
    return;
  }
  for (final UInlineAttr attr in UInlineAttr.values) {
    removeAttr(attr, sel.start, sel.end);
  }
  normalize();
  notifyListeners();
}