zhangchao 4 anni fa
parent
commit
95aceb0b42
1 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 5
    4
      src/RichTextEditor.js

+ 5
- 4
src/RichTextEditor.js Vedi File

@@ -200,7 +200,7 @@ export default class RichTextEditor extends Component {
200 200
   }
201 201
 
202 202
   _renderLinkModal() {
203
-    const {linkOption} = this.props;
203
+    const {linkOption,optionalText} = this.props;
204 204
     return (
205 205
         <Modal
206 206
             animationType={"fade"}
@@ -213,9 +213,10 @@ export default class RichTextEditor extends Component {
213 213
               <Text style={styles.inputTitle}>{linkOption.titleText}</Text>
214 214
               <View style={styles.inputWrapper}>
215 215
                 <TextInput
216
-                    style={styles.input}
217
-                    onChangeText={(text) => this.setState({linkTitle: text})}
218
-                    value={this.state.linkTitle}
216
+                  style={styles.input}
217
+                  onChangeText={(text) => this.setState({linkTitle: text})}
218
+                  value={this.state.linkTitle}
219
+                  placeholder={optionalText}
219 220
                 />
220 221
               </View>
221 222
               <Text style={[styles.inputTitle ,{marginTop: 10}]}>{linkOption.urlText}</Text>