Add `contentEditable` guide to README [Close #169]

nolan/hinaloe-test
Etienne Lemay 2018-03-02 14:15:49 -05:00
parent af2fdc71a1
commit 31246e41ef
No known key found for this signature in database
GPG Key ID: EE7CF89146BB28E9
1 changed files with 18 additions and 0 deletions

View File

@ -189,6 +189,24 @@ The Emoji component being a [functional component](https://medium.com/missive-ap
}}></span> }}></span>
``` ```
#### Using with `contentEditable`
Following the `dangerouslySetInnerHTML` example above, make sure the wrapping `span` sets `contenteditable="false"`.
```js
<div contentEditable={true}>
Looks good to me
<span contentEditable={false} dangerouslySetInnerHTML={{
__html: Emoji({
html: true
set: 'apple'
emoji: '+1'
size: 24
})
}}></span>
</div>
```
## Custom emojis ## Custom emojis
You can provide custom emojis which will show up in their own category. You can provide custom emojis which will show up in their own category.