Skip to content

Commit fd074b4

Browse files
committed
feat: 6.1.1
1 parent d81d4a6 commit fd074b4

File tree

6 files changed

+105
-5
lines changed

6 files changed

+105
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"markdown-it-anchor": "^9.2.0",
1919
"markdown-it-link-attributes": "^4.0.1",
2020
"markdown-it-mark": "^4.0.0",
21-
"md-editor-rt": "^6.1.0",
21+
"md-editor-rt": "^6.1.1",
2222
"next": "^15.3.3",
2323
"react": "^19.1.0",
2424
"react-dom": "^19.1.0",

public/demo-en-US.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,30 @@ const onRemount = useCallback(() => {
12031203
}, []);
12041204
```
12051205
1206+
### 🛞 Link Shortener Extension
1207+
1208+
```js
1209+
import { config } from 'md-editor-rt';
1210+
1211+
config({
1212+
codeMirrorExtensions(extensions) {
1213+
return extensions.map((item) => {
1214+
if (item.type === 'linkShortener') {
1215+
return {
1216+
...item,
1217+
options: {
1218+
maxLength: 100,
1219+
shortenText: (url: string) => '...',
1220+
},
1221+
};
1222+
}
1223+
1224+
return item;
1225+
});
1226+
},
1227+
});
1228+
```
1229+
12061230
## 🧻 Edit This Page
12071231
12081232
[demo-en-US](https://github.com/imzbf/md-editor-rt/blob/dev-docs/public/demo-en-US.md)

public/demo-zh-CN.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,30 @@ const onRemount = useCallback(() => {
12241224
}, []);
12251225
```
12261226
1227+
### 🛞 缩短链接配置
1228+
1229+
```js
1230+
import { config } from 'md-editor-v3';
1231+
1232+
config({
1233+
codeMirrorExtensions(extensions) {
1234+
return extensions.map((item) => {
1235+
if (item.type === 'linkShortener') {
1236+
return {
1237+
...item,
1238+
options: {
1239+
maxLength: 100,
1240+
shortenText: (url: string) => '...',
1241+
},
1242+
};
1243+
}
1244+
1245+
return item;
1246+
});
1247+
},
1248+
});
1249+
```
1250+
12271251
## 🧻 编辑此页面
12281252
12291253
[demo-zh-CN](https://github.com/imzbf/md-editor-rt/blob/dev-docs/public/demo-zh-CN.md)

public/grammar-en-US.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
!!! tip
2+
3+
When using inline syntax (such as bold, italic, etc.), if the text to be bolded contains special characters and the bold markers (like `**`) are immediately adjacent to other characters, be sure to add at least one space after the second marker (such as `**`). Otherwise, the Markdown parser may not correctly recognize the bold effect.
4+
5+
Example:
6+
7+
Incorrect: `AAA**I have a dream.**BBB`
8+
9+
Correct: `AAA**I have a dream.** BBB`
10+
11+
The same issue applies to other inline syntaxes (such as italics, etc.). Please remember to add a space after the syntax marker to ensure correct parsing.
12+
13+
!!!
14+
115
## 🐶 Heading
216

317
```markdown
@@ -386,3 +400,15 @@ failure、danger、bug、example、quote、hint、caution、error、attention
386400
Please note that this module will not handle dangerous code, and you need to ensure the security of your data on your own!
387401

388402
!!!
403+
404+
## 🦄 Link Reference
405+
406+
[md-editor-rt][1]
407+
408+
[1]: https://imzbf.github.io/md-editor-rt/
409+
410+
```markdown
411+
[md-editor-rt][1]
412+
413+
[1]: https://imzbf.github.io/md-editor-rt/
414+
```

public/grammar-zh-CN.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
!!! tip
2+
3+
在使用行内语法(如加粗、斜体等)时,如果需要加粗的文本中包含特殊字符,并且加粗标识符(如 `**`)前后紧挨着其他字符,请务必在第二个标识符(如 `**`)后添加至少一个空格。否则,Markdown 解析器可能无法正确识别加粗效果。
4+
5+
示例:
6+
7+
错误写法:`AAA**I have a dream.**BBB`
8+
9+
正确写法:`AAA**I have a dream.** BBB`
10+
11+
同样的问题也适用于其它行内语法(如斜体等),请注意在语法标识符后添加空格以确保正确解析。
12+
13+
!!!
14+
115
## 🐶 标题
216

317
```markdown
@@ -386,3 +400,15 @@ failure、danger、bug、example、quote、hint、caution、error、attention
386400
请注意,该模块不会处理危险的代码,你需要自行保证数据的安全!
387401

388402
!!!
403+
404+
## 🦄 链接引用
405+
406+
[md-editor-rt][1]
407+
408+
[1]: https://imzbf.github.io/md-editor-rt/
409+
410+
```markdown
411+
[md-editor-rt][1]
412+
413+
[1]: https://imzbf.github.io/md-editor-rt/
414+
```

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,10 +2524,10 @@ math-intrinsics@^1.1.0:
25242524
resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"
25252525
integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==
25262526

2527-
md-editor-rt@^6.1.0:
2528-
version "6.1.0"
2529-
resolved "https://registry.npmjs.org/md-editor-rt/-/md-editor-rt-6.1.0.tgz#5eb42473cb3d35486a32f7f75ca8409e9e44914c"
2530-
integrity sha512-gYSJZwj5GJt9ZwVaju50RtVb2gyYZ4YjI3yVO8jR9GBc6WECr5vgrYuMG8MiPSV4s937wnOBuSKRKJaWUH2P1A==
2527+
md-editor-rt@^6.1.1:
2528+
version "6.1.1"
2529+
resolved "https://registry.npmjs.org/md-editor-rt/-/md-editor-rt-6.1.1.tgz#dea447a6bd1edc6c7208f0acd4b0a59d6b30267c"
2530+
integrity sha512-eTIexZurWlAvxOLxFLCObYFFc1Z5xoU8UkoysRoWyB3K+5YUR9m12cDqYZeeDt4ifbmTdc2mWUGpNeI9LXEtFw==
25312531
dependencies:
25322532
"@codemirror/autocomplete" "^6.18.7"
25332533
"@codemirror/commands" "^6.8.1"

0 commit comments

Comments
 (0)