Skip to content

Commit

Permalink
fix: github build error
Browse files Browse the repository at this point in the history
  • Loading branch information
stulip committed Apr 3, 2023
1 parent 8cf47df commit 38b8a46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ export default FontFamilyStylesheet;
```javascript
import FontFamilyStylesheet from 'stylesheet.js';

<RichEditor
editorStyle={{ initialCSSText: `${FontFamilyStylesheet}`, contentCSSText: `font-family: 'Your Font Family';` }}
/>
const fontFamily = 'Your_Font_Family';
const initialCSSText = { initialCSSText: `${FontFamilyStylesheet}`, contentCSSText: `font-family: ${fontFamily}` }
<RichEditor editorStyle={initialCSSText}/>
```
5. Reload the app. You should now be seeing your Rich Editor content in your custom font face!

Expand Down Expand Up @@ -293,6 +293,8 @@ import React from "react";
import { Text, Platform, KeyboardAvoidingView, SafeAreaView, ScrollView } from "react-native";
import {actions, RichEditor, RichToolbar} from "react-native-pell-rich-editor";


const handleHead = ({tintColor}) => <Text style={{color: tintColor}}>H1</Text>
const TempScreen = () => {
const richText = React.useRef();
return (
Expand All @@ -312,7 +314,7 @@ const TempScreen = () => {
<RichToolbar
editor={richText}
actions={[ actions.setBold, actions.setItalic, actions.setUnderline, actions.heading1 ]}
iconMap={{ [actions.heading1]: ({tintColor}) => (<Text style={[{color: tintColor}]}>H1</Text>), }}
iconMap={{ [actions.heading1]: handleHead }}
/>
</SafeAreaView>
);
Expand Down
2 changes: 1 addition & 1 deletion examples/src/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @author wxik
* @since 2019-06-24 14:52
*/
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {
Appearance,
Button,
Expand Down

0 comments on commit 38b8a46

Please sign in to comment.