Fix fonts and edition on replies

This commit is contained in:
aringenbach
2022-05-04 12:17:21 +02:00
parent 4cdf8b31cd
commit 8077b8058d
10 changed files with 45 additions and 19 deletions
@@ -228,6 +228,18 @@ typedef enum : NSUInteger {
*/
- (NSAttributedString*)renderHTMLString:(NSString*)htmlString forEvent:(MXEvent*)event withRoomState:(MXRoomState*)roomState;
/**
Render a random html string into an attributed string with the font and the text color
that correspond to the passed event.
@param htmlString the HTLM string to render.
@param event the event associated to the string.
@param roomState the room state right before the event.
@param isEditMode wether string will be used for edition in the composer
@return an attributed string.
*/
- (NSAttributedString*)renderHTMLString:(NSString*)htmlString forEvent:(MXEvent*)event withRoomState:(MXRoomState*)roomState isEditMode:(BOOL)isEditMode;
/**
Same as [self renderString:forEvent:] but add a prefix.
The prefix will be rendered with 'prefixTextFont' and 'prefixTextColor'.