diff --git a/Sources/PulseUI/Features/FileViewer/RichTextView/RichTextViewModel.swift b/Sources/PulseUI/Features/FileViewer/RichTextView/RichTextViewModel.swift index 764ab0a85..131a34f0b 100644 --- a/Sources/PulseUI/Features/FileViewer/RichTextView/RichTextViewModel.swift +++ b/Sources/PulseUI/Features/FileViewer/RichTextView/RichTextViewModel.swift @@ -27,7 +27,7 @@ public final class RichTextViewModel: ObservableObject { public var isEmpty: Bool { originalText.length == 0 } weak var textView: UXTextView? // Not proper MVVM - var textStorage: NSTextStorage { textView?.textStorage ?? NSTextStorage(string: "") } + var textStorage: NSTextStorage { textView?.textStorage ?? NSTextStorage(attributedString: originalText) } private var isSearchingInBackground = false private var isSearchNeeded = false