You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This reverts commit 45844a3.
Reasons to revert:
* For full text selectable readonly editor contents, `SelectableText`
only works on `TextSpan` children. `WidgetSpan` will make a gap for
text selection and implementing a `SelectableWidgetSpan` combines both
kinds of span is not easy to do: assert failure everywhere.
* `SelectableArea` handles `onTap` event where we only want
the gesture passed to children so that users could activate reply
state by a single tap, to fix the issue we need a custom ignore pointer
widget.
* Rendered style not consists comparing the editor when editing and
viewing page contents because the later one uses custom html parser
while the former one uses editor which renders custom bbcode tags, they
are not the same, both in history and in the future, as long as the
process differs. And the html parser is quite limited and not stable,
endless html layout rules are not clearly implemented, especially in
line break. Frequently used layout are supported but not always be,
massive special logic in the custom html parser makes it hard to
maintain, let alone the selectable text feature we want to land in a
future version. I think it's time to sunset the current html parser,
or at least render into quill_delta so that we can have consistent
contents appearance when editing and viewing contents.
Next step:
* Other implementation may not work, like use `Wrap` to simulate the
original rich text features in flutter SDK, I don't think the result
could be better than the one in SDK.
* We need selectable text and consistent appearance when editing and
viewing contents so render it in the bbcode editor is the best choice.
Waiting for upstream fix selection in readOnly mode here:
singerdmx/flutter-quill#2529
After that, parse supported tags here:
https://github.com/realth000/tsdm_client/blob/81395ca8f5f5ee9ebe63cff1d223f585a895bf9a/lib/utils/html/html_muncher.dart#L335
into custom bbcode tags to let the bbcode editor render it as common
quill_delta tags, hard but worth it.
0 commit comments