Skip to content
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

Selecte and copy CUSTOM widgetSpan then paste the text is an unknown character of an obj. #45

Open
chifandeyu opened this issue Jun 10, 2022 · 4 comments

Comments

@chifandeyu
Copy link

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
Copy link

nvshah commented Jun 16, 2022

@chifandeyu Did you try making param selectable = true of ParsedText Widget ?

@nvshah
Copy link

nvshah commented Jun 16, 2022

If you need more custom configuration then toolbarOptions param is missing for which I've raised request ref PR

@MichalNemec
Copy link

Hello, i have selectable true and im getting this [obj] too. How can toolbarOptions solve this?

@MichalNemec
Copy link

@fayeed Could we expect this issue to be solved in near future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants