BoostIO / boostnote-mobile

Boostnote for iOS and Android 🚀
https://boostnote.io/
MIT License
816 stars 158 forks source link

Syntax highlight support for markdown preview #21 #58

Closed yu1l closed 6 years ago

yu1l commented 6 years ago

Hi ! This pull request adds syntax highlight support for markdown preview. - realate to #21 I used react-native-syntax-highlighter for it.

// in app/views/NoteModal.js
...
import NotePreview from '../components/NotePreview'
...
<NotePreview
    style={styles.container}
    theme={"github"}
    syntaxFontSize={14}
    syntaxFontFamily={Platform.OS === 'ios' ? 'Menlo-Regular' : 'monospace'}
    text={this.state.text} />

I tried to find which theme suits boostnote-mobile, but couldn't find. So I just applied github theme. theme list is here

out2