react-native-drag-text-editor
react-native-drag-text-editor copied to clipboard
Use the text prop to set text in editor
The documentation says that the text
prop is used to set the contents of the editor, but the current code expects to find that information in a PlaceHolder
prop. This PR fixes the code to match the documentation.
Hey @reggie3! thanks for your attention. It looks like just a Readme mistake. Text value of editor is setting in onText
function with onChangeText
prop of TextInput in DragTextEditor.js. Also in that part you mentioned PlaceHolder
prop is setting the first value of text state with a condition.Tell me If I'm missing something you said ?
It sounds like you're saying that if we want to provide text to the DragTextEditor
component, then it needs to be provided via the PlaceHolder
prop; Is that correct? If not, how should the text be provided?
Want to provide external text to the component other than text entered on the keyboard? If so. Yes, You can do that with the PlaceHolder
prop. The prop name may vary but you should do this for all the PlaceHolder
props.
Okay, that makes sense. If that is the case, then I don't think this PR is necessary.