diff --git a/ios/RNTAztecView/RCTAztecView.swift b/ios/RNTAztecView/RCTAztecView.swift index 27c4f18..ec59113 100644 --- a/ios/RNTAztecView/RCTAztecView.swift +++ b/ios/RNTAztecView/RCTAztecView.swift @@ -21,7 +21,7 @@ class RCTAztecView: Aztec.TextView { }() private let formatStringMap: [FormattingIdentifier: String] = [ - .bold: "Bold", + .bold: "bold", .italic: "italic", .strikethrough: "strikethrough", .link: "link", @@ -239,7 +239,7 @@ class RCTAztecView: Aztec.TextView { } else { identifiers = formattingIdentifiersForTypingAttributes() } - let formats = identifiers.compactMap(formatString) + let formats = identifiers.compactMap { formatStringMap[$0] } onActiveFormatsChange(["formats": formats]) } @@ -250,10 +250,6 @@ class RCTAztecView: Aztec.TextView { onActiveFormatAttributesChange?(["attributes": attributes]) } - private func formatString(from identifier: FormattingIdentifier) -> String? { - return formatStringMap[identifier] - } - func propagateSelectionChanges() { guard let onSelectionChange = onSelectionChange else { return