react-headless-mde 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +12 -26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-headless-mde",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "React Headless Markdown Editor",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/readme.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Introduction
2
2
  ===
3
3
  A simple yet powerful and extensible **React Markdown Editor** that aims to have feature parity with the Github Markdown editor.
4
- React-mde has no 3rd party dependencies.
4
+ React-mde-headless has no 3rd party dependencies.
5
5
 
6
6
  ## [Demo](https://codesandbox.io/s/charming-marco-9m4z93?file=/src/index.tsx)
7
7
 
@@ -17,7 +17,7 @@ import {
17
17
  italicCommand,
18
18
  linkCommand,
19
19
  useTextAreaMarkdownEditor,
20
- } from 'react-mde';
20
+ } from 'react-mde-headless';
21
21
 
22
22
  export const MarkdownEditor = () => {
23
23
  const { ref, commandController } = useTextAreaMarkdownEditor({
@@ -43,43 +43,29 @@ export const MarkdownEditor = () => {
43
43
  );
44
44
  };
45
45
  ```
46
+ ## Todo
46
47
 
47
- ## XSS concerns
48
+ ### Third party
49
+ - https://github.com/grassator/insert-text-at-cursor by https://twitter.com/d_kubyshkin
50
+
51
+ ### XSS concerns
48
52
 
49
- React-mde does not automatically sanitize the HTML preview. If your using Showdown,
53
+ React-mde-headless does not automatically sanitize the HTML preview. If your using Showdown,
50
54
  this has been taken from [their documentation](https://github.com/showdownjs/showdown/wiki/Markdown's-XSS-Vulnerability-(and-how-to-mitigate-it)):
51
55
 
52
56
  > Cross-side scripting is a well known technique to gain access to private information of the users
53
57
  of a website. The attacker injects spurious HTML content (a script) on the web page which will read
54
58
  the user’s cookies and do something bad with it (like steal credentials). As a countermeasure,
55
- you should filter any suspicious content coming from user input. Showdown doesn’t include an
56
- XSS filter, so you must provide your own. But be careful in how you do it…
59
+ you should filter any suspicious content coming from user input. Showdown doesn’t include an
60
+ XSS filter, so you must provide your own. But be careful in how you do it…
57
61
 
58
62
  You might want to take a look at [showdown-xss-filter](https://github.com/VisionistInc/showdown-xss-filter).
59
63
 
60
- It is also possible to return a Promise to a React Element from `generateMarkdownPreview`, which makes
61
- it possible to use [ReactMarkdown](https://github.com/rexxars/react-markdown) as a preview. [View issue](https://github.com/andrerpena/react-mde/issues/161).
62
- ReactMarkdown has built-in XSS protection.
63
-
64
- Please refer to the [commands source code](https://github.com/andrerpena/react-mde/tree/master/src/commands) to understand how they
65
- should be implemented.
66
-
67
- ## Change log / Migrating from older versions
68
-
69
- [Instructions here](https://github.com/andrerpena/react-mde/blob/master/docs-md/ChangeLogMigrating.md).
70
-
71
64
  ## Licence
72
65
 
73
- React-mde is [MIT licensed](https://github.com/andrerpena/react-mde/blob/master/LICENSE).
74
-
75
- ## Third party
76
-
77
- In order to make React-mde zero deps, I've embedded two small libraries:
78
- - https://github.com/grassator/insert-text-at-cursor by https://twitter.com/d_kubyshkin
79
- - https://github.com/JedWatson/classnames by https://twitter.com/JedWatson
66
+ React-mde-headless is [MIT licensed](https://github.com/andrerpena/react-mde/blob/master/LICENSE).
80
67
 
81
68
  ## About the author
82
69
 
83
- Made with :heart: by André Pena and [other awesome contributors](https://github.com/andrerpena/react-mde/graphs/contributors).
70
+ Made with :heart: by André Pena and [other awesome contributors](https://github.com/andrerpena).
84
71
 
85
- [![twitter](https://img.shields.io/twitter/follow/andrerpena?style=social)](https://twitter.com/andrerpena)