react-native-highlightr
TypeScript icon, indicating that this package has built-in type declarations

0.1.24 • Public • Published

react-native-highlightr

a code editor component for react native -- this component is a wrapper of Highlightr

currently ios only

Installation

npm install react-native-highlightr

cd ios

pod install

Usage

import HighlightrView from 'react-native-highlightr'
...
<HighlightrView language={"Swift"} theme={"atom-one-dark"} value={"func helloWorld(){}"} onChangeText={someFunc}/>

Props (more formal documentation coming soon)

see highlightrjs for availabe languages and themes

  • language - type: String, description: the name of the coding language to be highlighted
  • theme - type: String, description: theme for syntax highlighing
  • value - type: String, description: a string value for the code editor view (mirrors text input value prop usagae)
  • editable - type: Boolean, description: a boolean to toggle whether the text view's text is editable (if false, keyboard is disabled)
  • onChangeText - type: Function, description: a callback function that has the current string value of the text view passed in
  • onPress - type: Function, description: a callback function called whenever the text view is pressed
  • keyboardAppearance - type: enum ['light', 'dark'], description: sets keyboard appearance for the text view

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i react-native-highlightr

Weekly Downloads

0

Version

0.1.24

License

MIT

Unpacked Size

58.7 kB

Total Files

26

Last publish

Collaborators

  • dayejack