mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 00:49:44 +00:00
Improve message edit with RTE (#1742)
* Improv edit for RTE * Refine code block style in composer * Update matrix-wysiwyg-composer-swift to 2.13.0 * Remove workaround * Update ElementX/Sources/Services/Timeline/TimelineItems/Items/Messages/TextRoomTimelineItemContent.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * Refactor rawFormattedBody -> formattedBodyHTMLString --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
+2
@@ -19,4 +19,6 @@ import UIKit
|
||||
struct TextRoomTimelineItemContent: Hashable {
|
||||
let body: String
|
||||
var formattedBody: AttributedString?
|
||||
/// The original textual representation of the formatted body directly from the event (usually HTML code)
|
||||
var formattedBodyHTMLString: String?
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
let htmlBody = messageContent.formatted?.format == .html ? messageContent.formatted?.body : nil
|
||||
let formattedBody = (htmlBody != nil ? attributedStringBuilder.fromHTML(htmlBody) : attributedStringBuilder.fromPlain(messageContent.body))
|
||||
|
||||
return .init(body: messageContent.body, formattedBody: formattedBody)
|
||||
return .init(body: messageContent.body, formattedBody: formattedBody, formattedBodyHTMLString: htmlBody)
|
||||
}
|
||||
|
||||
private func buildAudioTimelineItemContent(_ messageContent: AudioMessageContent) -> AudioRoomTimelineItemContent {
|
||||
|
||||
Reference in New Issue
Block a user