@godievski/rn-syntax-highlighter
v0.1.11
Published
Syntax highlighter for React-Native
Downloads
69
Maintainers
Readme
RN Syntax Highlighter
Syntax highlighting component for React Native
using react-syntax-highlighter
Install
npm install @godievski/rn-syntax-highlighter --save
npx pod-install
Use
props
Accepts almost all of the same props as react-syntax-highlighter
with some additional props.
fontFamily
(string) - the font family to use for syntax text.fontSize
(number) - the fontSize for syntax text.dark
(boolean) - darkmode for the numbers of the linesstartingLineNumber
(number) - number from the line numbering will starthighligter
(string) - defaults to rendering with vdom created from highlightjs, but can pass inprism
as alternate option. You can see more about dealing with the prism highlighter in the docs for react-syntax-highlighter but one of the main uses would be better support for jsx