react-native-rich-editor icon indicating copy to clipboard operation
react-native-rich-editor copied to clipboard

Is there any way to add custom font family to editor Html

Open prathasaxena opened this issue 4 years ago • 5 comments

@stulip
I have been trying to add a custom font family to editor html: I added jf-flat-regular-webfont.woff, jf-flat-regular-webfont.woff2 files parallel to the editor file. image

then i added the custom fonts in the html Screenshot 2020-07-31 at 6 04 17 PM

finally I applied the font in
contentCSSText: font-size: 45px; min-height: 200px; height: 100%; font-family:'jf_flatregular'; , // initial valid };

but the changes did not reflect.

prathasaxena avatar Jul 31 '20 12:07 prathasaxena

@prathasaxena Did you find a solution?

vinivitin avatar Sep 19 '20 09:09 vinivitin

@prathasaxena Did you find a solution?

Screenshot 2020-09-21 at 7 41 51 PM I used this, for some reasons it was not accessing local files.

prathasaxena avatar Sep 21 '20 14:09 prathasaxena

Okay, thanks)

vinivitin avatar Sep 21 '20 14:09 vinivitin

Hey Guys, i made a fork of this repo and added the needed functionality.

BTW you can use local fonts but you have to convert them, i use https://transfonter.org/ for this.

best regards :)

FloMueh avatar Jan 13 '21 13:01 FloMueh

I've got an MR to provide more context on using custom fonts.

Check it out if you're lost like I was: https://github.com/wxik/react-native-rich-editor/pull/241

jakehasler avatar Apr 21 '22 23:04 jakehasler