Skip to content

Commit

Permalink
4.15.3
Browse files Browse the repository at this point in the history
  • Loading branch information
imzbf committed May 24, 2024
1 parent 9872568 commit ceb0d27
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 36 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "md-editor-rt",
"version": "4.15.2",
"version": "4.15.3",
"keywords": [
"react",
"nextjs",
Expand All @@ -26,13 +26,13 @@
"build": "vite build --mode=preview"
},
"dependencies": {
"@vavt/cm-extension": "^1.4.1",
"@vavt/cm-extension": "^1.4.2",
"@vavt/rt-extension": "^1.2.1",
"dayjs": "^1.11.3",
"markdown-it-anchor": "^9.0.1",
"markdown-it-link-attributes": "^4.0.1",
"markdown-it-mark": "^4.0.0",
"md-editor-rt": "^4.15.2",
"md-editor-rt": "^4.15.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^7.2.6",
Expand Down
4 changes: 4 additions & 0 deletions public/demo-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ yarn add md-editor-rt
npm install md-editor-rt
```

When using server-side rendering, make sure to set `editorId` to a constant value.

#### 🤓 Jsx Template

```jsx
Expand Down Expand Up @@ -75,6 +77,8 @@ export default () => {
};
```

When using server-side rendering, `scrollElement` should be of string type, eg: `body`, `#id`, `.class`.

## 🥂 Api usage

Usages of some APIs.
Expand Down
4 changes: 4 additions & 0 deletions public/demo-zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ yarn add md-editor-rt
npm install md-editor-rt
```

当使用服务端渲染时,请务必设置`editorId`为固定值。

#### 🤓 基本使用

```jsx
Expand Down Expand Up @@ -75,6 +77,8 @@ export default () => {
};
```

当使用服务端渲染时,`scrollElement`应该是字符类型,例:`body``#id``.class`

## 🥂 扩展功能

这里包含了一些编辑器`api`的使用示范
Expand Down
6 changes: 3 additions & 3 deletions public/doc-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ This is the props of `MdPreview`, which is also part of `MdEditor`:
### 🎲 editorId
- **type**: `string`
- **default**: `'md-editor-rt'`
- **default**: `'md-editor-rt\_[\d]'`
Editor's id, also the html id, it is used when there are two or more editor and server render.
Editor's id, default incrementing by number. When using server-side rendering, make sure to set this attribute to a constant value.

---

### 🔢 showCodeRowNumber

- **type**: `boolean`
- **default**: `false`
- **default**: `true`

Show row number for code block or not.

Expand Down
6 changes: 3 additions & 3 deletions public/doc-zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@
### 🎲 editorId

- **类型**`string`
- **默认值**`'md-editor-rt'`
- **默认值**`'md-editor-rt\_[\d]'`

编辑器唯一标识,非必须项,服务端渲染时,防止产生服务端与客户端渲染内容不一致错误提示,以及单页面多编辑器时做区别
编辑器唯一标识,默认数据递增。当使用服务端渲染时,请务必设置该属性为固定值,防止产生服务端与客户端渲染内容不一致错误提示。

---

### 🔢 showCodeRowNumber

- **类型**`boolean`
- **默认值**`false`
- **默认值**`true`

代码块是否显示行号。

Expand Down
32 changes: 24 additions & 8 deletions public/grammar-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ _It is a dream deeply rooted in the American dream._

## 🐼 Picture

![Description](https://imzbf.github.io/md-editor-rt/imgs/mark_emoji.gif)
![Description](https://imzbf.github.io/md-editor-rt/imgs/mark_emoji.gif 'title')

```markdown
![Description](https://imzbf.github.io/md-editor-rt/imgs/mark_emoji.gif)
![Description](https://imzbf.github.io/md-editor-rt/imgs/mark_emoji.gif 'title')
```

---
Expand Down Expand Up @@ -133,6 +133,22 @@ pnpm install md-editor-rt
```
````

### 🤌🏻 Forcefully fold

```js ::close
import MdEditor from 'md-editor-rt';
import 'md-editor-rt/lib/style.css';
```

````markdown
```js ::close
import MdEditor from 'md-editor-rt';
import 'md-editor-rt/lib/style.css';
```
````

According to the understanding of other editors, no other editors currently employ a similar syntax. Exercise caution when using this syntax if you intend to copy your content for display in other editors.

---

## 🐻‍❄️ Quote
Expand Down Expand Up @@ -189,14 +205,14 @@ pnpm install md-editor-rt

## 🐮 Table

| nickname | from |
| -------- | ---------------- |
| zhijian | ChongQing, China |
| THead1 | THead2 | THead3 | THead4 |
| :-------------- | :---------------: | ---------------: | ------- |
| text-align:left | text-align:center | text-align:right | default |

```markdown
| nickname | from |
| -------- | ---------------- |
| zhijian | ChongQing, China |
| THead1 | THead2 | THead3 | THead4 |
| :-------------- | :---------------: | ---------------: | ------- |
| text-align:left | text-align:center | text-align:right | default |
```

---
Expand Down
32 changes: 24 additions & 8 deletions public/grammar-zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ _It is a dream deeply rooted in the American dream._

## 🐼 图片

![描述文字](https://imzbf.github.io/md-editor-rt/imgs/mark_emoji.gif)
![描述文字](https://imzbf.github.io/md-editor-rt/imgs/mark_emoji.gif 'title')

```markdown
![描述文字](https://imzbf.github.io/md-editor-rt/imgs/mark_emoji.gif)
![描述文字](https://imzbf.github.io/md-editor-rt/imgs/mark_emoji.gif 'title')
```

---
Expand Down Expand Up @@ -133,6 +133,22 @@ pnpm install md-editor-rt
```
````

### 🤌🏻 强制折叠

```js ::close
import MdEditor from 'md-editor-rt';
import 'md-editor-rt/lib/style.css';
```

````markdown
```js ::close
import MdEditor from 'md-editor-rt';
import 'md-editor-rt/lib/style.css';
```
````

据其他编辑器的了解,目前没有其他编辑器使用类似的语法,如果需要拷贝你的内容到其他编辑器展示时,请谨慎使用该语法。

---

## 🐻‍❄️ 引用
Expand Down Expand Up @@ -189,14 +205,14 @@ pnpm install md-editor-rt

## 🐮 表格

| 昵称 | 来自 |
| ---- | --------- |
| 之间 | 中国-重庆 |
| 表头1 | 表头2 | 表头3 | 表头4 |
| :----- | :------: | -----: | ----- |
| 左对齐 | 中间对齐 | 右对齐 | 默认 |

```markdown
| 昵称 | 来自 |
| ---- | --------- |
| 之间 | 中国-重庆 |
| 表头1 | 表头2 | 表头3 | 表头4 |
| :----- | :------: | -----: | ----- |
| 左对齐 | 中间对齐 | 右对齐 | 默认 |
```

---
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1333,9 +1333,9 @@
"@codemirror/language" "^6.0.0"

"@codemirror/lint@^6.0.0":
version "6.7.1"
resolved "https://registry.npmjs.org/@codemirror/lint/-/lint-6.7.1.tgz#bed4b3a38785678efbe683efe0e61d8ccf478d58"
integrity sha512-rELba6QJD20/bNXWP/cKTGLrwVEcpa2ViwULCV03ONcY1Je85++7sczVRUlnE4TJMjatx3IJTz6HX4NXi+moXw==
version "6.8.0"
resolved "https://registry.npmjs.org/@codemirror/lint/-/lint-6.8.0.tgz#cf9067c7041c1f6c9f20bab411dac9323aab54f0"
integrity sha512-lsFofvaw0lnPRJlQylNsC4IRt/1lI4OD/yYslrSGVndOJfStc58v+8p9dgGiD90ktOfL7OhBWns1ZETYgz0EJA==
dependencies:
"@codemirror/state" "^6.0.0"
"@codemirror/view" "^6.0.0"
Expand Down Expand Up @@ -2041,10 +2041,10 @@
resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==

"@vavt/cm-extension@^1.4.1":
version "1.4.1"
resolved "https://registry.npmjs.org/@vavt/cm-extension/-/cm-extension-1.4.1.tgz#51b8c8f6643b9bdf1d911e616fc2b3c4da1cda11"
integrity sha512-Yw6AYuBNHBXF/dJUb1SqA9j5F2YckvNNs2LhvAj7t29Hl7yfcyMIob49HBsQvopQxbvwhVrYS+PsFNvhaZb3Sw==
"@vavt/cm-extension@^1.4.2":
version "1.4.2"
resolved "https://registry.npmjs.org/@vavt/cm-extension/-/cm-extension-1.4.2.tgz#755e98909275e3d6dedcce7d9a78a32315088c5c"
integrity sha512-2SU1Z8AAo+wiyhOQIY7GtVyBdSP/PGN+qg/460qCrz2uw9kBaWoaTkWNiPaW8KfeVrmhDkRUFgd1dm8vCIlMog==

"@vavt/rt-extension@^1.2.1":
version "1.2.1"
Expand Down Expand Up @@ -3593,10 +3593,10 @@ marked@*:
resolved "https://registry.npmjs.org/marked/-/marked-12.0.0.tgz#051ea8c8c7f65148a63003df1499515a2c6de716"
integrity sha512-Vkwtq9rLqXryZnWaQc86+FHLC6tr/fycMfYAhiOIXkrNmeGAyhSxjqu0Rs1i0bBqw5u0S7+lV9fdH2ZSVaoa0w==

md-editor-rt@^4.15.2:
version "4.15.2"
resolved "https://registry.npmjs.org/md-editor-rt/-/md-editor-rt-4.15.2.tgz#858ba478251c835fe3d8f5922f2e9da1321d5be9"
integrity sha512-vG4d9YqrK2UWEKNysIsZm3M/H6LxGqaI6gbKE/1Te8A2Un9dIAbhoXgN7F7toNfmjsMaKFGu30qshUKm6JNrOQ==
md-editor-rt@^4.15.3:
version "4.15.3"
resolved "https://registry.npmjs.org/md-editor-rt/-/md-editor-rt-4.15.3.tgz#22856f49f4e698e20ae69cfd0dc271162e0fc014"
integrity sha512-vvDmAx/wUvZOgInzJmmdw3N59P3jAwXYtWEkJmXHK6tqaXvLuEKWOySL3XApQETtOSh9GtC5w0DdWiJkXc15Xg==
dependencies:
"@codemirror/lang-markdown" "^6.2.5"
"@codemirror/language-data" "^6.5.1"
Expand Down

0 comments on commit ceb0d27

Please sign in to comment.