You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
# Markdown draft js
6
6
7
-
A tool for converting [Draft.js](https://facebook.github.io/draft-js/)[raw object](https://facebook.github.io/draft-js/docs/api-reference-data-conversion.html) to [markdown](https://daringfireball.net/projects/markdown/), and vice-versa.
7
+
A tool for converting [Draft.js](https://draftjs.org)[raw object](https://draftjs.org/docs/api-reference-data-conversion) to [markdown](https://daringfireball.net/projects/markdown/), and vice-versa.
8
8
9
9
**Looking for an example?**[There is a running example here](https://rosey.github.io/markdown-draft-js/)
10
10
@@ -18,7 +18,7 @@ It’s now 2019 and the landscape has potentially changed! I don’t spend a ton
18
18
19
19
Please note: We recommend using a polyfill (like babel-polyfill) since we're using a bunch of modern array methods.
20
20
21
-
`draftToMarkdown` expects a [RAW Draft.js JS object](https://facebook.github.io/draft-js/docs/api-reference-data-conversion.html).
21
+
`draftToMarkdown` expects a [RAW Draft.js JS object](https://draftjs.org/docs/api-reference-data-conversion).
22
22
23
23
It returns a string of markdown.
24
24
@@ -31,7 +31,7 @@ var markdownString = draftToMarkdown(rawObject);
31
31
32
32
`markdownToDraft` expects a string containing markdown.
33
33
34
-
It returns a [RAW Draft.js JS object](https://facebook.github.io/draft-js/docs/api-reference-data-conversion.html).
34
+
It returns a [RAW Draft.js JS object](https://draftjs.org/docs/api-reference-data-conversion).
35
35
36
36
```javascript
37
37
// First, import `draftToMarkdown`
@@ -81,7 +81,7 @@ constructor(props) {
81
81
82
82
In case you want to extend markdown’s functionality, you can. `draftToMarkdown` accepts an (optional) second `options` argument.
83
83
84
-
It takes two values: `styleItems` and `entityItems`. This is because of a distinction in draftjs between styles and entities. You can read more about them on [Draft’s documentation](https://facebook.github.io/draft-js/docs/api-reference-character-metadata.html).
84
+
It takes two values: `styleItems` and `entityItems`. This is because of a distinction in draftjs between styles and entities. You can read more about them on [Draft’s documentation](https://draftjs.org/docs/api-reference-character-metadata).
85
85
86
86
Say I wanted to convert <spanstyle="color: red">**red text**</span> from my Draft.js editor to a span with a red colour style. Unless I write a custom method for it, the markdown parser will ignore this special style, since it’s not a normal, pre-defined style. (An example of this style item is defined in one of the Draft.js [custom colours](https://github.com/facebook/draft-js/tree/master/examples/color) examples.)
0 commit comments