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

How to disable markdown in text message? #513

Closed
godzilla35 opened this issue Oct 25, 2023 · 3 comments
Closed

How to disable markdown in text message? #513

godzilla35 opened this issue Oct 25, 2023 · 3 comments
Labels
question Further information is requested

Comments

@godzilla35
Copy link

Hi

I want to disable markdown in messages.
For example, I write a message ~hello~ but it's shown like hello .
I don't want to get rid of tilde.

I'd greatly appreciate it if you could tell me how.

@godzilla35 godzilla35 added the question Further information is requested label Oct 25, 2023
@demchenkoalex
Copy link
Member

Hey!

I think passing TextEditingController that does nothing to the inputOptions will do the trick. According to the code

  /// Custom [TextEditingController]. If not provided, defaults to the
  /// [InputTextFieldController], which extends [TextEditingController] and has
  /// additional fatures like markdown support. If you want to keep additional
  /// features but still need some methods from the default [TextEditingController],
  /// you can create your own [InputTextFieldController] (imported from this lib)
  /// and pass it here.
  final TextEditingController? textEditingController;

so if you pass inputOptions: InputOptions(textEditingController: TextEditingController()) it should kill markdown transformation

@godzilla35
Copy link
Author

godzilla35 commented Oct 26, 2023

As you say, the text input window works as intended. But markdowns still apply to message bubbles.

ParsedText is being used in TextMessageText and ParsedText use several patterns including PatternStyle.lineThrough.pattern.

I need exclude the patterns in TextMessageText .

@godzilla35
Copy link
Author

godzilla35 commented Oct 27, 2023

I solve the problem by passing custom textMessageBuilder

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

No branches or pull requests

2 participants