Skip to content

Commit

Permalink
update instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
threepointone committed Nov 21, 2016
1 parent 08d284a commit a130f43
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ markdown-in-js
zero-overhead markdown in your react components

```jsx

import markdown from 'markdown-in-js' // this line is optional, but useful to satisfy linters

const App = () => markdown`
## This is some content.
You can write _markdown_ as you'd like.
${ <span> interpolate more <Content/> </span> }
you can <i>inline *html*</i>
<div style=${{fontWeight: 'bold'}} className=${'some more styles'} onClick=${handler}>
or even <CustomComponents/>, wow
<div style=${{ fontWeight: 'bold' }}
className=${'some more styles'}
onClick=${handler}>
interpolate attributes as expected
</div>
`
Expand All @@ -23,13 +29,14 @@ you can <i>inline *html*</i>

usage
---
add `'markdown-in-js/lib/babel'` to the `plugins` field of your babel config

- add `'markdown-in-js/babel'` to the `plugins` field of your babel config
- (optional) add [prismjs](http://prismjs.com/) for syntax highlighting of code blocks
- `import markdown from

todo
---

- code highlighting via prism.js
- optionally no-wrap paragraphs
- optionally return array of elements
- custom components for markdown primitives
Expand Down
1 change: 1 addition & 0 deletions babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib/babel')

0 comments on commit a130f43

Please sign in to comment.