wxik / react-native-rich-editor

Lightweight React Native (JavaScript, H5) rich text editor
https://wxik.github.io/react-native-rich-editor/web
MIT License
818 stars 304 forks source link

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

Open prathasaxena opened 4 years ago

prathasaxena commented 4 years ago

@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.

vinivitin commented 4 years ago

@prathasaxena Did you find a solution?

prathasaxena commented 4 years ago

@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.

vinivitin commented 4 years ago

Okay, thanks)

FloMueh commented 3 years ago

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 :)

jakehasler commented 2 years ago

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