Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pladaria committed May 19, 2017
1 parent 9fda883 commit e4c3403
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions README.md
Expand Up @@ -47,7 +47,7 @@ Render result:
</div>
```

## Custom marks
## Custom options

With the `options` prop you can define your own markup:

Expand All @@ -60,13 +60,13 @@ Available options:
import Mark from 'react-mark-ii';
//...
const options = {
'*': {renderer: 'b'},
'**': {renderer: 'b'},
'_': {renderer: 'u'},
'~': {renderer: ({children}) => <span className="red">{children}</span>},
'`': {renderer: 'kbd', raw: true},
};

const str = '*bold* _underline_ ~strike~ `code`';
const str = '**bold** _underline_ ~strike~ `code`';
//...
<Mark options={options}>{str}</Mark>
```
Expand All @@ -82,15 +82,6 @@ Render result:
</div>
```

Render result:

```html
<div>
<sup>superscript</sup>
<strong>bold text</strong>
</div>
```

## Custom wrapper

By default your children will be wrapped with a `div`. Use the `wrap` prop to have a different wrapper. You can use a React component or a tag name string.
Expand Down

0 comments on commit e4c3403

Please sign in to comment.