Skip to content

Commit

Permalink
adding back originWhitelist since it's needed for ios
Browse files Browse the repository at this point in the history
  • Loading branch information
abanobmikaeel committed Oct 5, 2023
1 parent a9587a5 commit d41b5cc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useRef } from 'react';
import { SafeAreaView } from 'react-native';
import { SafeAreaView, StyleSheet } from 'react-native';
import { Dimensions } from 'react-native';
import { WebView, type WebViewMessageEvent } from 'react-native-webview';

Expand Down Expand Up @@ -176,11 +176,10 @@ export const CKEditor5 = ({
ref={webview}
injectedJavaScript={injectedJS}
style={{
width: Dimensions.get('screen').width,
margin: 5,
overflow: 'hidden',
...styles.webview,
...style,
}}
originWhitelist={['*']}
scrollEnabled={true}
source={webapp}
scalesPageToFit={true}
Expand All @@ -199,3 +198,11 @@ export const CKEditor5 = ({
};

export default CKEditor5;

const styles = StyleSheet.create({
webview: {
width: Dimensions.get('screen').width,
margin: 5,
overflow: 'hidden',
}}
})

0 comments on commit d41b5cc

Please sign in to comment.