clear editor

pull/505/head
Andriy Trubchanin 4 years ago
parent 35c9f6bb0e
commit d8bef00340
  1. 7
      lib/src/widgets/controller.dart

@ -117,6 +117,13 @@ class QuillController extends ChangeNotifier {
bool get hasRedo => document.hasRedo;
/// clear editor
void clear() {
replaceText(
0, plainTextEditingValue.text.length-1, '',
TextSelection.collapsed(offset: 0));
}
void replaceText(
int index, int len, Object? data, TextSelection? textSelection,
{bool ignoreFocus = false}) {

Loading…
Cancel
Save