@expensify/react-native-live-markdown 0.1.142 → 0.1.144
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.
|
@@ -110,12 +110,17 @@
|
|
|
110
110
|
_markdownStyle = markdownStyle;
|
|
111
111
|
[_markdownUtils setMarkdownStyle:markdownStyle];
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
if (_textView != nil) {
|
|
114
|
+
// We want to use `textStorage` for applying markdown when possible. Currently it's only available for UITextView
|
|
115
|
+
[_textView textDidChange];
|
|
116
|
+
} else {
|
|
117
|
+
// apply new styles
|
|
114
118
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
115
|
-
|
|
119
|
+
[_textInput _setAttributedString:_backedTextInputView.attributedText];
|
|
116
120
|
#else
|
|
117
|
-
|
|
121
|
+
[_textInput setAttributedText:_textInput.attributedText];
|
|
118
122
|
#endif /* RCT_NEW_ARCH_ENABLED */
|
|
123
|
+
}
|
|
119
124
|
}
|
|
120
125
|
|
|
121
126
|
@end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expensify/react-native-live-markdown",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.144",
|
|
4
4
|
"description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|