1.6.8 • Published 3 years ago

@flomuehl/react-native-pell-rich-editor v1.6.8

Weekly downloads
11
License
ISC
Repository
github
Last release
3 years ago

react-native-pell-rich-editor with custom font face functionality

All Credits by wxik.

Changelog

1.6.8

fixed issue with onChange handler https://github.com/wxik/react-native-rich-editor/issues/141

how to add custom font face from web source

const iOSCustomFontFace = `@font-face {
        font-family: 'SFPro';
        src: url('https://your-web-server.com/assets/fonts/SFPro/sf-pro-text-regular.ttf?raw=true'),
            url('https://your-web-server.com/assets/fonts/SFPro/sf-pro-text-regular.ttf?raw=true');
    }
    @font-face {
        font-family: 'SFProSemi';
        src: url('https://your-web-server.com/assets/fonts/SFPro/sf-pro-text-semibold.ttf?raw=true'),
            url('https://your-web-server.com/assets/fonts/SFPro/sf-pro-text-semibold.ttf?raw=true');
    }`;

<RichEditor
    editorStyle={{
        initialCSSText: iOSCustomFontFace,
        customFontFamily: 'SFPro',
    }}
/>;

how to add custom local font

The Richeditor does not support to add your local font files. But there is a workaround for that.

You can convert your font file to base 64 css style. Just go to https://transfonter.org/.

Important enable Base 64 Encode.

1.6.8

3 years ago

1.6.7

3 years ago

1.6.6

3 years ago

1.6.5

3 years ago

1.6.4

3 years ago