From f016cad9e6669e486051bcc86926b4c5de8398ce Mon Sep 17 00:00:00 2001 From: Gerardo Date: Fri, 14 Jun 2024 17:18:47 +0200 Subject: [PATCH 1/2] iOS - readHTML remove DOCTYPE check since pasteHandler handles it --- .../react-native-aztec/ios/RNTAztecView/RCTAztecView.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift b/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift index 6304939b768a50..03362c3a371fb2 100644 --- a/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift +++ b/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift @@ -245,12 +245,8 @@ class RCTAztecView: Aztec.TextView { } private func readHTML(from pasteboard: UIPasteboard) -> String? { - if let data = pasteboard.data(forPasteboardType: kUTTypeHTML as String), let html = String(data: data, encoding: .utf8) { - // Make sure we are not getting a full HTML DOC. We only want inner content - if !html.hasPrefix(" Date: Fri, 14 Jun 2024 17:25:13 +0200 Subject: [PATCH 2/2] Update changelog --- packages/react-native-editor/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 07dbe7a2459958..66c145cd46a877 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -13,6 +13,7 @@ For each user feature we should also add a importance categorization label to i - [internal] Fix Inserter items list filtering [#62334] - [*] Prevent hiding the keyboard when creating new list items [#62446] - [*] RichText - Fix undefined onDelete callback [#62486] +- [*] Fix issue when pasting HTML content [#62588] ## 1.120.0 - [*] Prevent deleting content when backspacing in the first Paragraph block [#62069]