File tree 2 files changed +7
-2
lines changed
Sources/ExyteChat/ChatView
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 48
48
- Can display a fullscreen menu on long press a message cell (automatically shows scroll for big messages)
49
49
- Supports "reply to message" via message menu or through a closure. Remove and edit are ** coming soon**
50
50
- This library allows to send the following content in messages in any combination:
51
- - Text with/without markdown
51
+ - Arbitrarily styled text with ` AttributedString ` or markdown
52
52
- Photo/video
53
53
- Audio recording
54
54
** Coming soon:**
@@ -277,6 +277,7 @@ Please use `mediaPickerTheme` in a similar fashion to customize the built-in pho
277
277
` avatarSize ` - the default avatar is a circle, you can specify its diameter here
278
278
` tapAvatarClosure ` - closure to call on avatar tap
279
279
` messageUseMarkdown ` - use markdown (e.g. ** to make something bold) or not
280
+ ` messageUseStyler ` - pass a function that converts the message's ` String ` to the styled ` AttributedString `
280
281
` showMessageTimeView ` - show timestamp in a corner of the message
281
282
` setMessageFont ` - pass custom font to use for messages
282
283
Original file line number Diff line number Diff line change @@ -600,8 +600,12 @@ public extension ChatView {
600
600
}
601
601
602
602
func messageUseMarkdown( _ messageUseMarkdown: Bool ) -> ChatView {
603
+ return messageUseStyler ( String . markdownStyler)
604
+ }
605
+
606
+ func messageUseStyler( _ styler: @escaping ( String ) -> AttributedString ) -> ChatView {
603
607
var view = self
604
- view. messageStyler = String . markdownStyler
608
+ view. messageStyler = styler
605
609
return view
606
610
}
607
611
You can’t perform that action at this time.
0 commit comments