Selecte and copy CUSTOM widgetSpan then paste the text is an unknown character of an obj.
chifandeyu opened this issue · 4 comments
chifandeyu commented
I add a MatchText to ParsedText's parse. but I want copy it. but cant't copy text from renderWidget.
return MatchText(
pattern: TextEntity.emoPattern.pattern,
renderWidget: ({text, pattern}) {
Widget child = Text('$text ');
if (text.startsWith('[') && text.endsWith(']') && text.length >= 3) {
final content =
text.substring(1, text.length - 1).replaceAll(nullChar, '');
if (EmoUtil.instance.allEmoMap[content] != null) {
final Widget emoji =
EmoUtil.instance.getEmoIcon(content, size: fontSize);
child = Padding(
padding: fontSize == 48
? const EdgeInsets.fromLTRB(2, 4, 2, 4)
: const EdgeInsets.fromLTRB(2, 2, 2, 2),
child: emoji,
);
}
}
return child;
});
Capturer_video_20220610_161930_905.mp4
nvshah commented
@chifandeyu Did you try making param selectable = true
of ParsedText Widget ?
nvshah commented
If you need more custom configuration then toolbarOptions
param is missing for which I've raised request ref PR
MichalNemec commented
Hello, i have selectable true and im getting this [obj] too. How can toolbarOptions solve this?
MichalNemec commented
@fayeed Could we expect this issue to be solved in near future?