diff --git a/Components/Sources/Components/Components/Editors/Source Editor/WKSourceEditorTextFrameworkMediator.swift b/Components/Sources/Components/Components/Editors/Source Editor/WKSourceEditorTextFrameworkMediator.swift index b5ebf00b5e8..d1af809454f 100644 --- a/Components/Sources/Components/Components/Editors/Source Editor/WKSourceEditorTextFrameworkMediator.swift +++ b/Components/Sources/Components/Components/Editors/Source Editor/WKSourceEditorTextFrameworkMediator.swift @@ -123,6 +123,11 @@ final class WKSourceEditorTextFrameworkMediator: NSObject { listFormatter, strikethroughFormatter] + self.boldItalicsFormatter = boldItalicsFormatter + self.templateFormatter = templateFormatter + self.listFormatter = listFormatter + self.strikethroughFormatter = strikethroughFormatter + if needsTextKit2 { if #available(iOS 16.0, *) { let textContentManager = textView.textLayoutManager?.textContentManager diff --git a/Components/Sources/ComponentsObjC/WKSourceEditorFormatterBase.m b/Components/Sources/ComponentsObjC/WKSourceEditorFormatterBase.m index a441ebcce07..19042761268 100644 --- a/Components/Sources/ComponentsObjC/WKSourceEditorFormatterBase.m +++ b/Components/Sources/ComponentsObjC/WKSourceEditorFormatterBase.m @@ -35,6 +35,7 @@ - (void)addSyntaxHighlightingToAttributedString:(NSMutableAttributedString *)att // reset shared custom attributes [attributedString removeAttribute:WKSourceEditorCustomKeyColorGreen range:range]; + [attributedString removeAttribute:WKSourceEditorCustomKeyColorOrange range:range]; [attributedString addAttributes:self.attributes range:range]; }