Skip to content

Commit d3bbc29

Browse files
authored
Merge pull request nubasedev#283 from thaichor/update-readme
update readme props l18n
2 parents 6d518a7 + 0741748 commit d3bbc29

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

readme.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A simple yet powerful and extensible **React Markdown Editor** that aims to have
1919
## Installing
2020

2121
npm i react-mde
22-
22+
2323
## Using
2424

2525
React-mde is a completely controlled component.
@@ -87,7 +87,7 @@ The types are described below
8787
- **onChange: (value: string)**: Event handler for the `onChange` event.
8888
- **selectedTab: "write" | "preview"**: The currently selected tab.
8989
- **onTabChange: (tab) => void**: Function called when the selected tab changes.
90-
- **classes?: [Object](https://github.com/andrerpena/react-mde/blob/master/src/classes.ts)**: An object containing the following optional properties: *reactMde*, *toolbar*, *preview*, *textArea* and *suggestionsDropdown*.
90+
- **classes?: [Object](https://github.com/andrerpena/react-mde/blob/master/src/classes.ts)**: An object containing the following optional properties: *reactMde*, *toolbar*, *preview*, *textArea* and *suggestionsDropdown*.
9191
This allows for passing class names to each of the inner components of React-mde. Classes defined in the *classes* prop
9292
follow the specification of [Jed Watson's classNames project](https://github.com/JedWatson/classnames).
9393
- **commands?: Record<string, Command>**: An object with string properties representing keys, and a Command object as value for each key. These are custom commands. Commands are explained in more details below.
@@ -98,7 +98,7 @@ options. It is recommended to [inspect the layouts source code](https://github.c
9898
while the documentation is not complete.
9999
- **loadingPreview**: What to display in the preview while it is loading. Value can be string, React Element or anything React can render.
100100
- **readOnly?: boolean**: Flag to render the editor in read-only mode.
101-
- **l18n?**: A localization option. It contains the strings `write`, `preview` and `uploadingImage`.
101+
- [**l18n?**](src/types/L18n.ts): A localization option. It contains the strings `write`, `preview`, `uploadingImage` and `pasteDropSelect`.
102102
- **minEditorHeight?: number**: The minimum height of the editor.
103103
- **maxEditorHeight?: number**: The max height of the editor (after that, it will scroll).
104104
- **minPreviewHeight?: number**: The minimum height of the preview.
@@ -116,22 +116,22 @@ The following styles from React-mde should be added: (Both .scss and .css files
116116
Easiest way: import `react-mde-all.css`:
117117

118118
import 'react-mde/lib/styles/css/react-mde-all.css';
119-
119+
120120
If you want to have a more granular control over the styles, you can [import each individual file](https://github.com/andrerpena/react-mde/tree/master/src/styles).
121-
121+
122122
If you're using SASS, you can override these variables: https://github.com/andrerpena/react-mde/blob/master/src/styles/variables.scss
123123

124124
## XSS concerns
125125

126126
React-mde does not automatically sanitize the HTML preview. If your using Showdown,
127127
this has been taken from [their documentation](https://github.com/showdownjs/showdown/wiki/Markdown's-XSS-Vulnerability-(and-how-to-mitigate-it)):
128-
128+
129129
> Cross-side scripting is a well known technique to gain access to private information of the users
130-
of a website. The attacker injects spurious HTML content (a script) on the web page which will read
130+
of a website. The attacker injects spurious HTML content (a script) on the web page which will read
131131
the user’s cookies and do something bad with it (like steal credentials). As a countermeasure,
132-
you should filter any suspicious content coming from user input. Showdown doesn’t include an
132+
you should filter any suspicious content coming from user input. Showdown doesn’t include an
133133
XSS filter, so you must provide your own. But be careful in how you do it…
134-
134+
135135
You might want to take a look at [showdown-xss-filter](https://github.com/VisionistInc/showdown-xss-filter).
136136

137137
It is also possible to return a Promise to a React Element from `generateMarkdownPreview`, which makes

0 commit comments

Comments
 (0)