Skip to content

Commit

Permalink
Rosey#116: Add link to code for mention plugin example in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsnider authored Mar 25, 2020
1 parent 4fa9b58 commit 6ac94f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ Since entities can also contain additional custom information - in this case, th

What if you wanted to go the opposite direction? markdownToDraft uses [Remarkable](https://github.com/jonschlinkert/remarkable) for defining custom markdown types.

In this case, you need to write a [remarkable plugin](https://github.com/jonschlinkert/remarkable/blob/master/docs/plugins.md) first and pass it in to `markdownToDraft` -
In this case, you need to write a [remarkable plugin](https://github.com/jonschlinkert/remarkable/blob/master/docs/plugins.md) first such as [mentionWrapper](https://github.com/Rosey/markdown-draft-js/blob/master/test/markdown-to-draft.spec.js#L369) and pass it in to `markdownToDraft` -

```javascript
var rawDraftJSObject = markdownToDraft(markdownString, {
remarkablePlugins: [remarkableMentionPlugin],
remarkablePlugins: [mentionWrapper],
blockEntities: {
mention_open: function (item) {
return {
Expand Down

0 comments on commit 6ac94f5

Please sign in to comment.