@expensify/react-native-live-markdown 0.1.267 → 0.1.268
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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#import "MarkdownBackedTextInputDelegate.h"
|
|
2
2
|
|
|
3
|
+
#import <objc/message.h>
|
|
4
|
+
|
|
3
5
|
@implementation MarkdownBackedTextInputDelegate {
|
|
4
6
|
__weak RCTUITextView *_textView;
|
|
5
7
|
id<RCTBackedTextInputDelegate> _originalTextInputDelegate;
|
|
@@ -89,4 +91,12 @@
|
|
|
89
91
|
return [_originalTextInputDelegate textInputShouldSubmitOnReturn];
|
|
90
92
|
}
|
|
91
93
|
|
|
94
|
+
// This method is added as a patch in the New Expensify app.
|
|
95
|
+
// See https://github.com/Expensify/App/blob/fd4b9adc22144cb99db1a5634f8828a13fa8c374/patches/react-native%2B0.77.1%2B011%2BAdd-onPaste-to-TextInput.patch#L239
|
|
96
|
+
- (void)textInputDidPaste:(NSString *)type withData:(NSString *)data
|
|
97
|
+
{
|
|
98
|
+
void (*func)(id, SEL, NSString*, NSString*) = (void (*)(id, SEL, NSString*, NSString*))objc_msgSend;
|
|
99
|
+
func(_originalTextInputDelegate, @selector(textInputDidPaste:withData:), type, data);
|
|
100
|
+
}
|
|
101
|
+
|
|
92
102
|
@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.268",
|
|
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",
|