From d8849f65cba3619c02457f574b8952dd81c498a9 Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Fri, 22 Nov 2024 06:24:17 -0500 Subject: [PATCH] Make sure all NSTextStorage instances are plain text only --- Edit/Modules/TextSystem/TextViewSystem.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Edit/Modules/TextSystem/TextViewSystem.swift b/Edit/Modules/TextSystem/TextViewSystem.swift index e6d72ef..087d23f 100644 --- a/Edit/Modules/TextSystem/TextViewSystem.swift +++ b/Edit/Modules/TextSystem/TextViewSystem.swift @@ -180,6 +180,7 @@ extension TextViewSystem { public func reload(from url: URL, attributes: [NSAttributedString.Key: Any]) throws { let options: [NSAttributedString.DocumentReadingOptionKey: Any] = [ .defaultAttributes: attributes, + .documentType: NSAttributedString.DocumentType.plain, ] let storage = try TSYTextStorage(url: url, options: options, documentAttributes: nil)