Skip to content

Commit c079a08

Browse files
authored
Merge pull request #35 from hiro08gh/chore-update-document
chore: update document
2 parents 407f528 + 8aafa93 commit c079a08

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

README.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Convert microCMS Rich Editor response to Markdown.
44

5-
<img width="1326" alt="スクリーンショット 0005-12-09 14 26 25" src="https://github.com/hiro08gh/rich-editor-to-markdown-parser/assets/39504660/68c9397f-1c80-45fa-97be-ca3fdc1e46ef">
5+
<img width="1326" alt="rich-editor-to-markdown-parser image" src="https://github.com/hiro08gh/rich-editor-to-markdown-parser/assets/39504660/68c9397f-1c80-45fa-97be-ca3fdc1e46ef">
66

77
## Installation
88

@@ -13,49 +13,49 @@ npm install rich-editor-to-markdown-parser
1313
## Usage
1414

1515
```js
16-
import { parser } from 'rich-editor-to-markdown-parser';
17-
// If you are importing multiple items with the same name parser, please assign an alias to them.
18-
import { parser as RichEditorToMarkddownParser } from 'rich-editor-to-markdown-parser';
16+
import { parser } from "rich-editor-to-markdown-parser";
1917

20-
const html = '<h1>Hello World!</h1><p>This <strong>html</strong> string is <s>convert</s>into <a href="https://exampe.com">markdown.</a></p>'
18+
const html =
19+
'<h1>Hello World!</h1><p>This <strong>html</strong> string is <s>convert</s>into <a href="https://exampe.com">markdown.</a></p>';
2120

2221
parser(html); // # Hello World!\n\nThis **html** string is ~~convert~~ into [markdown.](https://exampe.com)
2322
```
2423

2524
※ Unsupported HTML tags are parsed as strings. When converting markdown to HTML, consider sanitizing it using [DOMPurify](https://github.com/cure53/DOMPurify) or [sanitize-html](https://github.com/apostrophecms/sanitize-html).
25+
2626
## HTML list
2727

28-
| HTML | Description |
29-
| --- | --- |
30-
| Heading | |
31-
| Bold | |
32-
| Italic | |
33-
| Underline | Parsed with HTML tags |
34-
| Strike | |
35-
| Code | |
36-
| TextAlign | Not supported |
37-
| Horizontal Rule | |
38-
| Blockquote | |
39-
| CodeBlock | |
40-
| Table | |
41-
| ListBullet | |
42-
| ListOrdered | |
43-
| Link | |
44-
| Image | |
45-
| Embed | Not supported |
46-
| Custom class | Parsed with HTML tags |
28+
| HTML | Description |
29+
| --------------- | --------------------- |
30+
| Heading | |
31+
| Bold | |
32+
| Italic | |
33+
| Underline | Parsed with HTML tags |
34+
| Strike | |
35+
| Code | |
36+
| TextAlign | Not supported |
37+
| Horizontal Rule | |
38+
| Blockquote | |
39+
| CodeBlock | |
40+
| Table | |
41+
| ListBullet | |
42+
| ListOrdered | |
43+
| Link | |
44+
| Image | |
45+
| Embed | Not supported |
46+
| Custom class | Parsed with HTML tags |
4747

4848
## Options
4949

50-
| Option | Description | Defualt |
51-
| --- | --- | --- |
52-
| image.size | Contain width and height image size. ex) ?w=1200&h=630 | true |
53-
| image.query | Add image query in markdown. ex) ?format=webp | '' |
54-
| markStyle.strong | ** or __ | ** |
55-
| markStyle.em | * or _ | * |
56-
| markStyle.li | - or * or + | - |
57-
| markStyle.hr | --- or *** or ___ | --- |
58-
| markStyle.pre | ``` or ~~~ | ``` |
50+
| Option | Description | Defualt |
51+
| ---------------- | ------------------------------------------------------ | ------- |
52+
| image.size | Contain width and height image size. ex) ?w=1200&h=630 | true |
53+
| image.query | Add image query in markdown. ex) ?format=webp | '' |
54+
| markStyle.strong | \*\* or \_\_ | \*\* |
55+
| markStyle.em | \* or \_ | \* |
56+
| markStyle.li | - or \* or + | - |
57+
| markStyle.hr | --- or \*\*\* or \_\_\_ | --- |
58+
| markStyle.pre | ``` or ~~~ | ``` |
5959

6060
## Development
6161

0 commit comments

Comments
 (0)