getPlainText method
Retrieves the plain text content from the editor.
The getPlainText method is used to extract the plain text content from the editor as a String. This can be useful when you need to retrieve the editor's content without any formatting or HTML tags.
Implementation
Future<String> getPlainText() async {
try {
String? text = await _editorKey?.currentState?._getPlainTextFromEditor();
if (text == null) {
return "";
} else {
return text;
}
} catch (e) {
return "";
}
}