|
@@ -153,6 +153,9 @@ export default class RichTextEditor extends Component {
|
153
|
153
|
style={{height: 20}}
|
154
|
154
|
onChangeText={(text) => this.setState({linkUrl: text})}
|
155
|
155
|
value={this.state.linkUrl}
|
|
156
|
+ keyboardType="url"
|
|
157
|
+ autoCapitalize="none"
|
|
158
|
+ autoCorrect={false}
|
156
|
159
|
/>
|
157
|
160
|
</View>
|
158
|
161
|
{PlatfomIOS && <View style={styles.lineSeparator}/>}
|
|
@@ -216,12 +219,17 @@ export default class RichTextEditor extends Component {
|
216
|
219
|
injectedJavaScript={injectScript}
|
217
|
220
|
source={pageSource}
|
218
|
221
|
onLoad={() => this.init()}
|
|
222
|
+ onShouldStartLoadWithRequest={(event) => {return this._onShouldStartLoadWithRequest(event)}}
|
219
|
223
|
/>
|
220
|
224
|
{this._renderLinkModal()}
|
221
|
225
|
</View>
|
222
|
226
|
);
|
223
|
227
|
}
|
224
|
228
|
|
|
229
|
+ _onShouldStartLoadWithRequest(event) {
|
|
230
|
+ return (event.url.indexOf('editor.html') != -1);
|
|
231
|
+ }
|
|
232
|
+
|
225
|
233
|
escapeJSONString = function(string) {
|
226
|
234
|
return string
|
227
|
235
|
.replace(/[\\]/g, '\\\\')
|