globocom / react-native-draftjs-render

React Native render for draft.js model
MIT License
390 stars 62 forks source link

Links are not tappable. #42

Closed jayporta closed 6 years ago

jayporta commented 6 years ago

Update:

Fixed it. User error.

I took the instructions too literally and passed the blocks in as contentState rather than the whole object.

Original post

I can see links are styled with underlines, so they're detected as links, but they're not tappable.

Here's the block object:

{ 
       text: 'This is a link ',
       entityRanges: [ { length: 14, key: 0, offset: 0 } ],
       depth: 0,
       data: {},
       key: 'fos3q',
       inlineStyleRanges: [],
       type: 'unstyled' 
},

Using React Native 55

I assumed I should create an atomic handler to wrap these links in TouchableOpacity but as you can see there is no data type.