From 7b9cc634d514835a0fd92d7743123211b06da4ee Mon Sep 17 00:00:00 2001 From: Gerardo Date: Mon, 18 Mar 2024 13:11:48 +0100 Subject: [PATCH] Fix defaultTextColor typo --- .../Classes/Formatters/Implementations/MarkFormatter.swift | 6 +++--- Aztec/Classes/TextKit/TextView.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Aztec/Classes/Formatters/Implementations/MarkFormatter.swift b/Aztec/Classes/Formatters/Implementations/MarkFormatter.swift index 652783e4e..e180689e8 100644 --- a/Aztec/Classes/Formatters/Implementations/MarkFormatter.swift +++ b/Aztec/Classes/Formatters/Implementations/MarkFormatter.swift @@ -5,7 +5,7 @@ class MarkFormatter: AttributeFormatter { var placeholderAttributes: [NSAttributedString.Key: Any]? var textColor: String? - var defaulTextColor: UIColor? + var defaultTextColor: UIColor? func applicationRange(for range: NSRange, in text: NSAttributedString) -> NSRange { return range @@ -36,8 +36,8 @@ class MarkFormatter: AttributeFormatter { func remove(from attributes: [NSAttributedString.Key: Any]) -> [NSAttributedString.Key: Any] { var resultingAttributes = attributes - if defaulTextColor != nil { - resultingAttributes[.foregroundColor] = defaulTextColor + if defaultTextColor != nil { + resultingAttributes[.foregroundColor] = defaultTextColor } resultingAttributes.removeValue(forKey: .markHtmlRepresentation) diff --git a/Aztec/Classes/TextKit/TextView.swift b/Aztec/Classes/TextKit/TextView.swift index 8e3180720..7656a6831 100644 --- a/Aztec/Classes/TextKit/TextView.swift +++ b/Aztec/Classes/TextKit/TextView.swift @@ -1158,7 +1158,7 @@ open class TextView: UITextView { open func toggleMark(range: NSRange, color: String?, resetColor: Bool) { let formatter = MarkFormatter() formatter.placeholderAttributes = self.defaultAttributes - formatter.defaulTextColor = self.defaultTextColor + formatter.defaultTextColor = self.defaultTextColor formatter.textColor = color // If the format exists remove the current formatting