Skip to content

Commit

Permalink
Merge pull request #86 from 10play/update-docs
Browse files Browse the repository at this point in the history
fix: update docs
  • Loading branch information
17Amir17 authored Mar 20, 2024
2 parents 5e11e81 + 51f1dfb commit feb6bd2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ After years of developing rich text editors for mobile, we realized that there i
## Expo

`npx expo install @10play/tentap-editor react-native-webview`
Only basic usage without custom keyboard is supported by Expo Go (see [basic example](../examples/basic.md)).
Only basic usage without custom keyboard is supported by Expo Go (see [basic example](https://10play.github.io/10tap-editor/docs/examples/basic)).
Otherwise you will need to setup [Expo Dev Client](https://docs.expo.dev/develop/development-builds/introduction/).

Now you ready to add tentap to your app!
Expand All @@ -53,12 +53,22 @@ export const Basic = () => {
const editor = useEditorBridge({
autofocus: true,
avoidIosKeyboard: true,
initialContent,
initialContent: 'Start editing!',
});

return (
<SafeAreaView style={{ flex: 1 }}>
<RichText editor={editor} />
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={{
position: 'absolute',
width: '100%',
bottom: 0,
}}
>
<Toolbar editor={editor} />
</KeyboardAvoidingView>
</SafeAreaView>
);
};
Expand Down
12 changes: 11 additions & 1 deletion website/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,22 @@ export const Basic = () => {
const editor = useEditorBridge({
autofocus: true,
avoidIosKeyboard: true,
initialContent,
initialContent: 'Start editing!',
});

return (
<SafeAreaView style={{ flex: 1 }}>
<RichText editor={editor} />
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={{
position: 'absolute',
width: '100%',
bottom: 0,
}}
>
<Toolbar editor={editor} />
</KeyboardAvoidingView>
</SafeAreaView>
);
};
Expand Down

0 comments on commit feb6bd2

Please sign in to comment.