formatSelection method

void formatSelection(
  1. NotusAttribute attribute
)

Formats current selection with attribute.

Implementation

void formatSelection(NotusAttribute attribute) {
  final index = _selection.start;
  final length = _selection.end - index;
  formatText(index, length, attribute);
}