@chaitrabhairappa/react-native-rich-text-editor 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2114,11 +2114,14 @@ class RichTextEditorView: UIView, UITextViewDelegate, PHPickerViewControllerDele
|
|
|
2114
2114
|
|
|
2115
2115
|
private func createMediaAttachmentAttributedString(mediaAttachment: [String: Any], image: UIImage?, width: CGFloat?, height: CGFloat?) -> NSAttributedString {
|
|
2116
2116
|
let uri = (mediaAttachment["uri"] as? String)?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
|
|
2117
|
-
let sourceUri = (mediaAttachment["sourceUri"] as? String)
|
|
2117
|
+
let sourceUri = (mediaAttachment["sourceUri"] as? String)
|
|
2118
|
+
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
|
2118
2119
|
.flatMap { $0.isEmpty ? nil : $0 } ?? uri
|
|
2119
|
-
let kind = (mediaAttachment["kind"] as? String)
|
|
2120
|
+
let kind = (mediaAttachment["kind"] as? String)
|
|
2121
|
+
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
|
2120
2122
|
.flatMap { $0.isEmpty ? nil : $0 } ?? "image"
|
|
2121
|
-
let alt = (mediaAttachment["alt"] as? String)
|
|
2123
|
+
let alt = (mediaAttachment["alt"] as? String)
|
|
2124
|
+
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
|
2122
2125
|
.flatMap { $0.isEmpty ? nil : $0 } ?? "Selected image"
|
|
2123
2126
|
|
|
2124
2127
|
let widthFromPayload = numberValue(mediaAttachment["width"]).map { CGFloat(truncating: $0) }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaitrabhairappa/react-native-rich-text-editor",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "A high-performance native rich text editor for React Native (New Architecture / Fabric only)",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|