-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.0.0] Migration to fully native components #92
Comments
I messed around with As you can see I was able to add bold and italic and thin text, but I had to hardcode this as a parameter in the constructor of the widget: AnnotatedEditableText(
style: Theme.of(context).textTheme.bodyText1!,
controller: controller,
focusNode: node,
backgroundCursorColor: Colors.amber,
cursorColor: Colors.green,
annotations: [
Annotation(range: TextRange(start: 1, end: 2), style: TextStyle(fontWeight: FontWeight.w100)),
Annotation(range: TextRange(start: 2, end: 5), style: TextStyle(fontWeight: FontWeight.bold, fontStyle: FontStyle.italic))
],
) I have yet to try making |
Seems that some rich text editors, built with native components, already exist. The most popular and feature-rich among them is flutter_quill. |
Hello all, the PR at flutter/flutter#83537 now enables support for rich content (ie any widget under the sun) inside the stock editable text. This is absolutely huge for the future of rich text editors and I plan to try and use these new features to make a more native-feeling solution for HTML.
I am not saying that it will be possible to make an HTML editor using native components, however. There will need to be a fairly robust parser mechanism to convert a Flutter widget tree back into an HTML widget tree. Thankfully we already have parsers like flutter_html to do it the opposite direction and support
initialText
.If anyone has any ideas or feature requests feel free to drop them below. This issue may be open for a while as I try and work on this, and again, there is no guarantee this will come to fruition. Though I will certainly try!
I appreciate all the support I have had so far on this package, much more to come♥️
The text was updated successfully, but these errors were encountered: