@uiw/react-md-editor 4.0.11 → 4.1.1

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 (69) hide show
  1. package/README.md +91 -35
  2. package/common.d.ts +17 -0
  3. package/dist/mdeditor.css +105 -110
  4. package/dist/mdeditor.js +3280 -4534
  5. package/dist/mdeditor.min.css +1 -1
  6. package/dist/mdeditor.min.js +1 -1
  7. package/dist/mdeditor.min.js.LICENSE.txt +2 -2
  8. package/esm/Editor.common.d.ts +5 -0
  9. package/esm/Editor.common.js +7 -0
  10. package/esm/Editor.d.ts +4 -11
  11. package/esm/Editor.factory.d.ts +14 -0
  12. package/esm/Editor.factory.js +285 -0
  13. package/esm/Editor.js +5 -261
  14. package/esm/Editor.nohighlight.d.ts +4 -11
  15. package/esm/Editor.nohighlight.js +5 -261
  16. package/esm/commands/list.js +3 -4
  17. package/esm/commands/title.js +5 -6
  18. package/esm/components/DragBar/index.js +3 -4
  19. package/esm/components/TextArea/Markdown.common.d.ts +5 -0
  20. package/esm/components/TextArea/Markdown.common.js +57 -0
  21. package/esm/components/TextArea/Markdown.js +6 -8
  22. package/esm/components/TextArea/Textarea.js +13 -17
  23. package/esm/components/TextArea/factory.d.ts +33 -0
  24. package/esm/components/TextArea/factory.js +102 -0
  25. package/esm/components/TextArea/index.common.d.ts +3 -0
  26. package/esm/components/TextArea/index.common.js +6 -0
  27. package/esm/components/TextArea/index.d.ts +3 -27
  28. package/esm/components/TextArea/index.js +5 -100
  29. package/esm/components/TextArea/index.nohighlight.d.ts +3 -27
  30. package/esm/components/TextArea/index.nohighlight.js +2 -93
  31. package/esm/components/Toolbar/Child.js +8 -9
  32. package/esm/components/Toolbar/index.js +22 -28
  33. package/esm/index.common.d.ts +16 -0
  34. package/esm/index.common.js +16 -0
  35. package/esm/react-markdown-preview.common.d.ts +4 -0
  36. package/esm/utils/markdownUtils.js +13 -17
  37. package/lib/Editor.common.d.ts +5 -0
  38. package/lib/Editor.common.js +15 -0
  39. package/lib/Editor.d.ts +4 -11
  40. package/lib/Editor.factory.d.ts +14 -0
  41. package/lib/Editor.factory.js +333 -0
  42. package/lib/Editor.js +4 -318
  43. package/lib/Editor.nohighlight.d.ts +4 -11
  44. package/lib/Editor.nohighlight.js +4 -318
  45. package/lib/components/TextArea/Markdown.common.d.ts +5 -0
  46. package/lib/components/TextArea/Markdown.common.js +68 -0
  47. package/lib/components/TextArea/factory.d.ts +33 -0
  48. package/lib/components/TextArea/factory.js +109 -0
  49. package/lib/components/TextArea/index.common.d.ts +3 -0
  50. package/lib/components/TextArea/index.common.js +14 -0
  51. package/lib/components/TextArea/index.d.ts +3 -27
  52. package/lib/components/TextArea/index.js +6 -98
  53. package/lib/components/TextArea/index.nohighlight.d.ts +3 -27
  54. package/lib/components/TextArea/index.nohighlight.js +3 -92
  55. package/lib/index.common.d.ts +16 -0
  56. package/lib/index.common.js +123 -0
  57. package/lib/react-markdown-preview.common.d.ts +4 -0
  58. package/package.json +8 -2
  59. package/src/Editor.common.tsx +7 -0
  60. package/src/Editor.factory.tsx +286 -0
  61. package/src/Editor.nohighlight.tsx +3 -271
  62. package/src/Editor.tsx +3 -271
  63. package/src/components/TextArea/Markdown.common.tsx +49 -0
  64. package/src/components/TextArea/factory.tsx +120 -0
  65. package/src/components/TextArea/index.common.tsx +6 -0
  66. package/src/components/TextArea/index.nohighlight.tsx +3 -108
  67. package/src/components/TextArea/index.tsx +3 -110
  68. package/src/index.common.tsx +19 -0
  69. package/src/react-markdown-preview.common.d.ts +4 -0
package/README.md CHANGED
@@ -1,36 +1,56 @@
1
+ <div align="center" markdown="1">
2
+ <sup>Special thanks to:</sup>
3
+ <br>
4
+ <br>
5
+
6
+ <a href="https://apps.apple.com/app/apple-store/id6757860829?pt=80185800&ct=jay&mt=8">
7
+ <img alt="SubList" width="400" src="https://jaywcjlove.github.io/sponsor/SubList.jpg">
8
+ </a>
9
+ <br>
10
+ <a href="https://apps.apple.com/app/apple-store/id6757860829?pt=80185800&ct=jay&mt=8">
11
+ SubList - Bill Reminder & Renewal Alerts
12
+ </a>
13
+ <br><br>
14
+
15
+ </div>
16
+ <hr>
17
+
1
18
  <div markdown="1">
2
19
  <sup>Using <a href="https://wangchujiang.com/#/app" target="_blank">my app</a> is also a way to <a href="https://wangchujiang.com/#/sponsor" target="_blank">support</a> me:</sup>
3
20
  <br>
4
- <a target="_blank" href="https://apps.apple.com/app/Deskmark/6755948110" title="Deskmark for macOS"><img alt="Deskmark" height="52" width="52" src="https://wangchujiang.com/appicon/deskmark.png"></a>
5
- <a target="_blank" href="https://apps.apple.com/app/Keyzer/6500434773" title="Keyzer for macOS"><img alt="Keyzer" height="52" width="52" src="https://wangchujiang.com/appicon/keyzer.png"></a>
6
- <a target="_blank" href="https://github.com/jaywcjlove/vidwall-hub" title="Vidwall Hub for macOS"><img alt="Vidwall Hub" height="52" width="52" src="https://wangchujiang.com/appicon/vidwall-hub.png"></a>
7
- <a target="_blank" href="https://apps.apple.com/app/VidCrop/6752624705" title="VidCrop for macOS"><img alt="VidCrop" height="52" width="52" src="https://wangchujiang.com/appicon/vidcrop.png"></a>
8
- <a target="_blank" href="https://apps.apple.com/app/Vidwall/6747587746" title="Vidwall for macOS"><img alt="Vidwall" height="52" width="52" src="https://wangchujiang.com/appicon/vidwall.png"></a>
9
- <a target="_blank" href="https://wangchujiang.com/mousio-hint/" title="Mousio Hint for macOS"><img alt="Mousio Hint" height="52" width="52" src="https://wangchujiang.com/appicon/mousio-hint.png"></a>
10
- <a target="_blank" href="https://apps.apple.com/app/6746747327" title="Mousio for macOS"><img alt="Mousio" height="52" width="52" src="https://wangchujiang.com/appicon/mousio.png"></a>
11
- <a target="_blank" href="https://apps.apple.com/app/6745227444" title="Musicer for macOS"><img alt="Musicer" height="52" width="52" src="https://wangchujiang.com/appicon/musicer.png"></a>
12
- <a target="_blank" href="https://apps.apple.com/app/6743841447" title="Audioer for macOS"><img alt="Audioer" height="52" width="52" src="https://wangchujiang.com/appicon/audioer.png"></a>
13
- <a target="_blank" href="https://apps.apple.com/app/6744690194" title="FileSentinel for macOS"><img alt="FileSentinel" height="52" width="52" src="https://wangchujiang.com/appicon/file-sentinel.png"></a>
14
- <a target="_blank" href="https://apps.apple.com/app/6743495172" title="FocusCursor for macOS"><img alt="FocusCursor" height="52" width="52" src="https://wangchujiang.com/appicon/focus-cursor.png"></a>
15
- <a target="_blank" href="https://apps.apple.com/app/6742680573" title="Videoer for macOS"><img alt="Videoer" height="52" width="52" src="https://wangchujiang.com/appicon/videoer.png"></a>
16
- <a target="_blank" href="https://apps.apple.com/app/6740425504" title="KeyClicker for macOS"><img alt="KeyClicker" height="52" width="52" src="https://wangchujiang.com/appicon/key-clicker.png"></a>
17
- <a target="_blank" href="https://apps.apple.com/app/6739052447" title="DayBar for macOS"><img alt="DayBar" height="52" width="52" src="https://wangchujiang.com/appicon/daybar.png"></a>
18
- <a target="_blank" href="https://apps.apple.com/app/6739444407" title="Iconed for macOS"><img alt="Iconed" height="52" width="52" src="https://wangchujiang.com/appicon/iconed.png"></a>
19
- <a target="_blank" href="https://apps.apple.com/app/6737160756" title="Mousio for macOS"><img alt="Mousio" height="52" width="52" src="https://wangchujiang.com/appicon/rightmenu-master.png"></a>
20
- <a target="_blank" href="https://apps.apple.com/app/6723903021" title="Paste Quick for macOS"><img alt="Quick RSS" height="52" width="52" src="https://wangchujiang.com/appicon/paste-quick.png"></a>
21
- <a target="_blank" href="https://apps.apple.com/app/6670696072" title="Quick RSS for macOS/iOS"><img alt="Quick RSS" height="52" width="52" src="https://wangchujiang.com/appicon/quick-rss.png"></a>
22
- <a target="_blank" href="https://apps.apple.com/app/6670167443" title="Web Serve for macOS"><img alt="Web Serve" height="52" width="52" src="https://wangchujiang.com/appicon/web-serve.png"></a>
23
- <a target="_blank" href="https://apps.apple.com/app/6503953628" title="Copybook Generator for macOS/iOS"><img alt="Copybook Generator" height="52" width="52" src="https://wangchujiang.com/appicon/copybook-generator.png"></a>
24
- <a target="_blank" href="https://apps.apple.com/app/6471227008" title="DevTutor for macOS/iOS"><img alt="DevTutor for SwiftUI" height="52" width="52" src="https://wangchujiang.com/appicon/devtutor.png"></a>
25
- <a target="_blank" href="https://apps.apple.com/app/6479819388" title="RegexMate for macOS/iOS"><img alt="RegexMate" height="52" width="52" src="https://wangchujiang.com/appicon/regex-mate.png"></a>
26
- <a target="_blank" href="https://apps.apple.com/app/6479194014" title="Time Passage for macOS/iOS"><img alt="Time Passage" height="52" width="52" src="https://wangchujiang.com/appicon/time-passage.png"></a>
27
- <a target="_blank" href="https://apps.apple.com/app/6478772538" title="IconizeFolder for macOS"><img alt="Iconize Folder" height="52" width="52" src="https://wangchujiang.com/appicon/iconize-folder.png"></a>
28
- <a target="_blank" href="https://apps.apple.com/app/6478511402" title="Textsound Saver for macOS/iOS"><img alt="Textsound Saver" height="52" width="52" src="https://wangchujiang.com/appicon/textsound-saver.png"></a>
29
- <a target="_blank" href="https://apps.apple.com/app/6476924627" title="Create Custom Symbols for macOS"><img alt="Create Custom Symbols" height="52" width="52" src="https://wangchujiang.com/appicon/create-custom-symbols.png"></a>
30
- <a target="_blank" href="https://apps.apple.com/app/6476452351" title="DevHub for macOS"><img alt="DevHub" height="52" width="52" src="https://wangchujiang.com/appicon/devhub.png"></a>
31
- <a target="_blank" href="https://apps.apple.com/app/6476400184" title="Resume Revise for macOS"><img alt="Resume Revise" height="52" width="52" src="https://wangchujiang.com/appicon/resume-revise.png"></a>
32
- <a target="_blank" href="https://apps.apple.com/app/6472593276" title="Palette Genius for macOS"><img alt="Palette Genius" height="52" width="52" src="https://wangchujiang.com/appicon/palette-genius.png"></a>
33
- <a target="_blank" href="https://apps.apple.com/app/6470879005" title="Symbol Scribe for macOS"><img alt="Symbol Scribe" height="52" width="52" src="https://wangchujiang.com/appicon/symbol-scribe.png"></a>
21
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6766860898" title="Zipora: Zip/RAR/7Z Unarchiver"><img alt="Zipora: Zip/RAR/7Z Unarchiver" height="52" src="https://wangchujiang.com/appicon/zipora.png"></a>
22
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6758053530" title="Scap: Screenshot & Markup Edit for macOS"><img alt="Scap: Screenshot & Markup Edit" height="52" src="https://wangchujiang.com/appicon/scap.png"></a>
23
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6757317079" title="Screen Test for macOS"><img alt="Screen Test" height="52" src="https://wangchujiang.com/appicon/screen-test.png"></a>
24
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6755948110" title="Deskmark for macOS"><img alt="Deskmark" height="52" src="https://wangchujiang.com/appicon/deskmark.png"></a>
25
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6500434773" title="Keyzer for macOS"><img alt="Keyzer" height="52" src="https://wangchujiang.com/appicon/keyzer.png"></a>
26
+ <a target="_blank" href="https://github.com/jaywcjlove/vidwall-hub" title="Vidwall Hub for macOS"><img alt="Vidwall Hub" height="52" src="https://wangchujiang.com/appicon/vidwall-hub.png"></a>
27
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6752624705" title="VidCrop for macOS"><img alt="VidCrop" height="52" src="https://wangchujiang.com/appicon/vidcrop.png"></a>
28
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6747587746" title="Vidwall for macOS"><img alt="Vidwall" height="52" src="https://wangchujiang.com/appicon/vidwall.png"></a>
29
+ <a target="_blank" href="https://wangchujiang.com/mousio-hint/" title="Mousio Hint for macOS"><img alt="Mousio Hint" height="52" src="https://wangchujiang.com/appicon/mousio-hint.png"></a>
30
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6746747327" title="Mousio for macOS"><img alt="Mousio" height="52" src="https://wangchujiang.com/appicon/mousio.png"></a>
31
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6745227444" title="Musicer for macOS"><img alt="Musicer" height="52" src="https://wangchujiang.com/appicon/musicer.png"></a>
32
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6743841447" title="Audioer for macOS"><img alt="Audioer" height="52" src="https://wangchujiang.com/appicon/audioer.png"></a>
33
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6744690194" title="FileSentinel for macOS"><img alt="FileSentinel" height="52" src="https://wangchujiang.com/appicon/file-sentinel.png"></a>
34
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6743495172" title="FocusCursor for macOS"><img alt="FocusCursor" height="52" src="https://wangchujiang.com/appicon/focus-cursor.png"></a>
35
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6742680573" title="Videoer for macOS"><img alt="Videoer" height="52" src="https://wangchujiang.com/appicon/videoer.png"></a>
36
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6740425504" title="KeyClicker for macOS"><img alt="KeyClicker" height="52" src="https://wangchujiang.com/appicon/key-clicker.png"></a>
37
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6739052447" title="DayBar for macOS"><img alt="DayBar" height="52" src="https://wangchujiang.com/appicon/daybar.png"></a>
38
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6739444407" title="Iconed for macOS"><img alt="Iconed" height="52" src="https://wangchujiang.com/appicon/iconed.png"></a>
39
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6737160756" title="Menuist for macOS"><img alt="Menuist" height="52" src="https://wangchujiang.com/appicon/rightmenu-master.png"></a>
40
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6723903021" title="Paste Quick for macOS"><img alt="Quick RSS" height="52" src="https://wangchujiang.com/appicon/paste-quick.png"></a>
41
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6670696072&platform=mac" title="Quick RSS for macOS/iOS"><img alt="Quick RSS" height="52" src="https://wangchujiang.com/appicon/quick-rss.png"></a>
42
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6670167443" title="Web Serve for macOS"><img alt="Web Serve" height="52" src="https://wangchujiang.com/appicon/web-serve.png"></a>
43
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6503953628&platform=mac" title="Copybook Generator for macOS/iOS"><img alt="Copybook Generator" height="52" src="https://wangchujiang.com/appicon/copybook-generator.png"></a>
44
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6471227008&platform=mac" title="DevTutor for macOS/iOS"><img alt="DevTutor for SwiftUI" height="52" src="https://wangchujiang.com/appicon/devtutor.png"></a>
45
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6479819388&platform=mac" title="RegexMate for macOS/iOS"><img alt="RegexMate" height="52" src="https://wangchujiang.com/appicon/regex-mate.png"></a>
46
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6479194014&platform=mac" title="Time Passage for macOS/iOS"><img alt="Time Passage" height="52" src="https://wangchujiang.com/appicon/time-passage.png"></a>
47
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6478772538" title="IconizeFolder for macOS"><img alt="Iconize Folder" height="52" src="https://wangchujiang.com/appicon/iconize-folder.png"></a>
48
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6478511402&platform=mac" title="Textsound Saver for macOS/iOS"><img alt="Textsound Saver" height="52" src="https://wangchujiang.com/appicon/textsound-saver.png"></a>
49
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6476924627" title="Create Custom Symbols for macOS"><img alt="Create Custom Symbols" height="52" src="https://wangchujiang.com/appicon/create-custom-symbols.png"></a>
50
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6476452351" title="DevHub for macOS"><img alt="DevHub" height="52" src="https://wangchujiang.com/appicon/devhub.png"></a>
51
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6476400184" title="Resume Revise for macOS"><img alt="Resume Revise" height="52" src="https://wangchujiang.com/appicon/resume-revise.png"></a>
52
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6472593276" title="Palette Genius for macOS"><img alt="Palette Genius" height="52" src="https://wangchujiang.com/appicon/palette-genius.png"></a>
53
+ <a target="_blank" href="https://jaywcjlove.github.io/maslink/?id=6470879005" title="Symbol Scribe for macOS"><img alt="Symbol Scribe" height="52" src="https://wangchujiang.com/appicon/symbol-scribe.png"></a>
34
54
  </div>
35
55
  <hr>
36
56
 
@@ -43,8 +63,11 @@
43
63
  </p>
44
64
 
45
65
  <p align="center">
46
- <a href="https://jaywcjlove.github.io/#/sponsor" target="__blank">
47
- <img alt="Buy me a coffee" src="https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee">
66
+ <a href="https://jaywcjlove.github.io/#/sponsor" title="Buy me a coffee">
67
+ <img src="https://img.shields.io/badge/Buy_Me_a_Coffee-ffdd00?logo=buy-me-a-coffee&logoColor=black" alt="Buy me a coffee">
68
+ </a>
69
+ <a href="https://x.com/jaywcjlove" title="Follow On X">
70
+ <img src="https://img.shields.io/badge/Follow%20on%20X-333333?logo=x&logoColor=white" alt="Follow On X">
48
71
  </a>
49
72
  <a href="https://www.npmjs.com/package/@uiw/react-md-editor" target="__blank">
50
73
  <img alt="Downloads" src="https://img.shields.io/npm/dm/@uiw/react-md-editor.svg?style=flat">
@@ -251,6 +274,36 @@ export default function App() {
251
274
  }
252
275
  ```
253
276
 
277
+ ### Common Code Highlight
278
+
279
+ Use `@uiw/react-md-editor/common` to keep syntax highlighting while only including the `rehype-prism-plus/common` language subset. This is a middle ground between the default full-language build and `nohighlight`.
280
+
281
+ ```jsx mdx:preview
282
+ import React from "react";
283
+ import MDEditor from '@uiw/react-md-editor/common';
284
+
285
+ const code = `**Hello world!!!**
286
+ \`\`\`js
287
+ function greet(name) {
288
+ console.log('hello', name);
289
+ }
290
+ \`\`\`
291
+ `
292
+
293
+ export default function App() {
294
+ const [value, setValue] = React.useState(code);
295
+ return (
296
+ <div className="container">
297
+ <MDEditor
298
+ value={value}
299
+ onChange={setValue}
300
+ />
301
+ <MDEditor.Markdown source={value} style={{ whiteSpace: 'pre-wrap' }} />
302
+ </div>
303
+ );
304
+ }
305
+ ```
306
+
254
307
  ### Placeholder & maxLength
255
308
 
256
309
  "Below is an example that sets the `placeholder` for the editor and defines the maximum input character length as `10` characters."
@@ -1128,10 +1181,12 @@ npm run start
1128
1181
 
1129
1182
  As always, thanks to our amazing contributors!
1130
1183
 
1131
- <!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT--><a href="https://github.com/jaywcjlove" title="小弟调调"><img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/></a>
1184
+ <!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-->
1185
+ <a href="https://github.com/jaywcjlove" title="小弟调调"><img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/></a>
1132
1186
  <a href="https://github.com/renovate-bot" title="Mend Renovate"><img src="https://avatars.githubusercontent.com/u/25180681?v=4" width="42;" alt="Mend Renovate"/></a>
1133
1187
  <a href="https://github.com/stevemk14ebr" title="Stephen Eckels"><img src="https://avatars.githubusercontent.com/u/6619205?v=4" width="42;" alt="Stephen Eckels"/></a>
1134
1188
  <a href="https://github.com/RARgames" title="RAR"><img src="https://avatars.githubusercontent.com/u/13639766?v=4" width="42;" alt="RAR"/></a>
1189
+ <a href="https://github.com/Stopa" title="Stepan Bolotnikov"><img src="https://avatars.githubusercontent.com/u/408256?v=4" width="42;" alt="Stepan Bolotnikov"/></a>
1135
1190
  <a href="https://github.com/alpharomercoma" title="Alpha Romer Coma"><img src="https://avatars.githubusercontent.com/u/108984668?v=4" width="42;" alt="Alpha Romer Coma"/></a>
1136
1191
  <a href="https://github.com/Exmirai" title="UniqueUlysees"><img src="https://avatars.githubusercontent.com/u/6436703?v=4" width="42;" alt="UniqueUlysees"/></a>
1137
1192
  <a href="https://github.com/sandiiarov" title="Alex Sandiiarov"><img src="https://avatars.githubusercontent.com/u/15861257?v=4" width="42;" alt="Alex Sandiiarov"/></a>
@@ -1149,14 +1204,15 @@ As always, thanks to our amazing contributors!
1149
1204
  <a href="https://github.com/peterj" title="Peter Jausovec"><img src="https://avatars.githubusercontent.com/u/11080940?v=4" width="42;" alt="Peter Jausovec"/></a>
1150
1205
  <a href="https://github.com/phillipb" title="Phillip Burch"><img src="https://avatars.githubusercontent.com/u/1482089?v=4" width="42;" alt="Phillip Burch"/></a>
1151
1206
  <a href="https://github.com/psycho-baller" title="Rami Maalouf"><img src="https://avatars.githubusercontent.com/u/81759594?v=4" width="42;" alt="Rami Maalouf"/></a>
1152
- <a href="https://github.com/Stopa" title="Stepan Bolotnikov"><img src="https://avatars.githubusercontent.com/u/408256?v=4" width="42;" alt="Stepan Bolotnikov"/></a>
1153
1207
  <a href="https://github.com/toresbe" title="Tore Sinding Bekkedal"><img src="https://avatars.githubusercontent.com/u/1761606?v=4" width="42;" alt="Tore Sinding Bekkedal"/></a>
1154
1208
  <a href="https://github.com/valenfv" title="Valentin"><img src="https://avatars.githubusercontent.com/u/34139820?v=4" width="42;" alt="Valentin"/></a>
1155
1209
  <a href="https://github.com/jmtes" title="juno tesoro"><img src="https://avatars.githubusercontent.com/u/38450133?v=4" width="42;" alt="juno tesoro"/></a>
1156
1210
  <a href="https://github.com/juspky" title="juspky"><img src="https://avatars.githubusercontent.com/u/11074890?v=4" width="42;" alt="juspky"/></a>
1157
1211
  <a href="https://github.com/ryicoh" title="ryicoh"><img src="https://avatars.githubusercontent.com/u/37844673?v=4" width="42;" alt="ryicoh"/></a>
1158
1212
  <a href="https://github.com/wj0990" title="wangjie"><img src="https://avatars.githubusercontent.com/u/8792016?v=4" width="42;" alt="wangjie"/></a>
1159
- <a href="https://github.com/xiaohuoni" title="聪小陈"><img src="https://avatars.githubusercontent.com/u/11746742?v=4" width="42;" alt="聪小陈"/></a><!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->
1213
+ <a href="https://github.com/xiaohuoni" title="聪小陈"><img src="https://avatars.githubusercontent.com/u/11746742?v=4" width="42;" alt="聪小陈"/></a>
1214
+
1215
+ <!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->
1160
1216
 
1161
1217
  Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
1162
1218
 
package/common.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ declare module '@uiw/react-md-editor/common' {
2
+ import MDEditor from '@uiw/react-md-editor/esm/Editor.common';
3
+ import * as commands from '@uiw/react-md-editor/esm/commands';
4
+ import * as MarkdownUtil from '@uiw/react-md-editor/esm/utils/markdownUtils';
5
+ export { headingExecute } from '@uiw/react-md-editor/esm/commands/title';
6
+ export * from '@uiw/react-md-editor/esm/commands';
7
+ export * from '@uiw/react-md-editor/esm/commands/group';
8
+ export * from '@uiw/react-md-editor/esm/utils/markdownUtils';
9
+ export * from '@uiw/react-md-editor/esm/utils/InsertTextAtPosition';
10
+ export * from '@uiw/react-md-editor/esm/Editor.common';
11
+ export * from '@uiw/react-md-editor/esm/Context';
12
+ export * from '@uiw/react-md-editor/esm/Types';
13
+ export { default as handleKeyDown } from '@uiw/react-md-editor/esm/components/TextArea/handleKeyDown';
14
+ export { default as shortcuts } from '@uiw/react-md-editor/esm/components/TextArea/shortcuts';
15
+ export { MarkdownUtil, commands };
16
+ export default MDEditor;
17
+ }
package/dist/mdeditor.css CHANGED
@@ -1099,113 +1099,6 @@ body[data-color-mode*='light'] {
1099
1099
  cursor: help;
1100
1100
  }
1101
1101
 
1102
- .w-md-editor-toolbar-child {
1103
- position: absolute;
1104
- border-radius: 3px;
1105
- box-shadow: 0 0 0 1px var(--md-editor-box-shadow-color), 0 0 0 var(--md-editor-box-shadow-color), 0 1px 1px var(--md-editor-box-shadow-color);
1106
- background-color: var(--md-editor-background-color);
1107
- z-index: 1;
1108
- display: none;
1109
- }
1110
- .w-md-editor-toolbar-child.active {
1111
- display: block;
1112
- }
1113
- .w-md-editor-toolbar-child .w-md-editor-toolbar {
1114
- border-bottom: 0;
1115
- padding: 3px;
1116
- border-radius: 3px;
1117
- }
1118
- .w-md-editor-toolbar-child .w-md-editor-toolbar ul > li {
1119
- display: block;
1120
- }
1121
- .w-md-editor-toolbar-child .w-md-editor-toolbar ul > li button {
1122
- width: -webkit-fill-available;
1123
- height: auto;
1124
- height: initial;
1125
- box-sizing: border-box;
1126
- padding: 3px 4px 2px 4px;
1127
- margin: 0;
1128
- }
1129
-
1130
- .w-md-editor-toolbar {
1131
- border-bottom: 1px solid var(--md-editor-box-shadow-color);
1132
- background-color: var(--md-editor-background-color);
1133
- padding: 3px;
1134
- display: flex;
1135
- justify-content: space-between;
1136
- align-items: center;
1137
- border-radius: 3px 3px 0 0;
1138
- -webkit-user-select: none;
1139
- -moz-user-select: none;
1140
- user-select: none;
1141
- flex-wrap: wrap;
1142
- }
1143
- .w-md-editor-toolbar.bottom {
1144
- border-bottom: 0px;
1145
- border-top: 1px solid var(--md-editor-box-shadow-color);
1146
- border-radius: 0 0 3px 3px;
1147
- }
1148
- .w-md-editor-toolbar ul,
1149
- .w-md-editor-toolbar li {
1150
- margin: 0;
1151
- padding: 0;
1152
- list-style: none;
1153
- line-height: normal;
1154
- line-height: initial;
1155
- }
1156
- .w-md-editor-toolbar li {
1157
- display: inline-block;
1158
- font-size: 14px;
1159
- }
1160
- .w-md-editor-toolbar li + li {
1161
- margin: 0;
1162
- }
1163
- .w-md-editor-toolbar li > button {
1164
- border: none;
1165
- height: 20px;
1166
- line-height: 14px;
1167
- background: none;
1168
- padding: 4px;
1169
- margin: 0 1px;
1170
- border-radius: 2px;
1171
- text-transform: none;
1172
- font-weight: normal;
1173
- overflow: visible;
1174
- outline: none;
1175
- cursor: pointer;
1176
- transition: all 0.3s;
1177
- white-space: nowrap;
1178
- color: var(--color-fg-default);
1179
- }
1180
- .w-md-editor-toolbar li > button:hover,
1181
- .w-md-editor-toolbar li > button:focus {
1182
- background-color: var(--color-neutral-muted);
1183
- color: var(--color-accent-fg);
1184
- }
1185
- .w-md-editor-toolbar li > button:active {
1186
- background-color: var(--color-neutral-muted);
1187
- color: var(--color-danger-fg);
1188
- }
1189
- .w-md-editor-toolbar li > button:disabled {
1190
- color: var(--md-editor-box-shadow-color);
1191
- cursor: not-allowed;
1192
- }
1193
- .w-md-editor-toolbar li > button:disabled:hover {
1194
- background-color: transparent;
1195
- color: var(--md-editor-box-shadow-color);
1196
- }
1197
- .w-md-editor-toolbar li.active > button {
1198
- color: var(--color-accent-fg);
1199
- background-color: var(--color-neutral-muted);
1200
- }
1201
- .w-md-editor-toolbar-divider {
1202
- height: 14px;
1203
- width: 1px;
1204
- margin: -3px 3px 0 3px !important;
1205
- vertical-align: middle;
1206
- background-color: var(--md-editor-box-shadow-color);
1207
- }
1208
-
1209
1102
  .w-md-editor-area {
1210
1103
  overflow: auto;
1211
1104
  border-radius: 5px;
@@ -1344,7 +1237,111 @@ body[data-color-mode*='light'] {
1344
1237
  color: #82071e !important;
1345
1238
  color: var(--color-prettylights-syntax-markup-deleted-text, #82071e) !important;
1346
1239
  }
1347
-
1240
+ .w-md-editor-toolbar-child {
1241
+ position: absolute;
1242
+ border-radius: 3px;
1243
+ box-shadow: 0 0 0 1px var(--md-editor-box-shadow-color), 0 0 0 var(--md-editor-box-shadow-color), 0 1px 1px var(--md-editor-box-shadow-color);
1244
+ background-color: var(--md-editor-background-color);
1245
+ z-index: 1;
1246
+ display: none;
1247
+ }
1248
+ .w-md-editor-toolbar-child.active {
1249
+ display: block;
1250
+ }
1251
+ .w-md-editor-toolbar-child .w-md-editor-toolbar {
1252
+ border-bottom: 0;
1253
+ padding: 3px;
1254
+ border-radius: 3px;
1255
+ }
1256
+ .w-md-editor-toolbar-child .w-md-editor-toolbar ul > li {
1257
+ display: block;
1258
+ }
1259
+ .w-md-editor-toolbar-child .w-md-editor-toolbar ul > li button {
1260
+ width: -webkit-fill-available;
1261
+ height: auto;
1262
+ height: initial;
1263
+ box-sizing: border-box;
1264
+ padding: 3px 4px 2px 4px;
1265
+ margin: 0;
1266
+ }
1267
+ .w-md-editor-toolbar {
1268
+ border-bottom: 1px solid var(--md-editor-box-shadow-color);
1269
+ background-color: var(--md-editor-background-color);
1270
+ padding: 3px;
1271
+ display: flex;
1272
+ justify-content: space-between;
1273
+ align-items: center;
1274
+ border-radius: 3px 3px 0 0;
1275
+ -webkit-user-select: none;
1276
+ -moz-user-select: none;
1277
+ user-select: none;
1278
+ flex-wrap: wrap;
1279
+ }
1280
+ .w-md-editor-toolbar.bottom {
1281
+ border-bottom: 0px;
1282
+ border-top: 1px solid var(--md-editor-box-shadow-color);
1283
+ border-radius: 0 0 3px 3px;
1284
+ }
1285
+ .w-md-editor-toolbar ul,
1286
+ .w-md-editor-toolbar li {
1287
+ margin: 0;
1288
+ padding: 0;
1289
+ list-style: none;
1290
+ line-height: normal;
1291
+ line-height: initial;
1292
+ }
1293
+ .w-md-editor-toolbar li {
1294
+ display: inline-block;
1295
+ font-size: 14px;
1296
+ }
1297
+ .w-md-editor-toolbar li + li {
1298
+ margin: 0;
1299
+ }
1300
+ .w-md-editor-toolbar li > button {
1301
+ border: none;
1302
+ height: 20px;
1303
+ line-height: 14px;
1304
+ background: none;
1305
+ padding: 4px;
1306
+ margin: 0 1px;
1307
+ border-radius: 2px;
1308
+ text-transform: none;
1309
+ font-weight: normal;
1310
+ overflow: visible;
1311
+ outline: none;
1312
+ cursor: pointer;
1313
+ transition: all 0.3s;
1314
+ white-space: nowrap;
1315
+ color: var(--color-fg-default);
1316
+ }
1317
+ .w-md-editor-toolbar li > button:hover,
1318
+ .w-md-editor-toolbar li > button:focus {
1319
+ background-color: var(--color-neutral-muted);
1320
+ color: var(--color-accent-fg);
1321
+ }
1322
+ .w-md-editor-toolbar li > button:active {
1323
+ background-color: var(--color-neutral-muted);
1324
+ color: var(--color-danger-fg);
1325
+ }
1326
+ .w-md-editor-toolbar li > button:disabled {
1327
+ color: var(--md-editor-box-shadow-color);
1328
+ cursor: not-allowed;
1329
+ }
1330
+ .w-md-editor-toolbar li > button:disabled:hover {
1331
+ background-color: transparent;
1332
+ color: var(--md-editor-box-shadow-color);
1333
+ }
1334
+ .w-md-editor-toolbar li.active > button {
1335
+ color: var(--color-accent-fg);
1336
+ background-color: var(--color-neutral-muted);
1337
+ }
1338
+ .w-md-editor-toolbar-divider {
1339
+ height: 14px;
1340
+ width: 1px;
1341
+ margin: -3px 3px 0 3px !important;
1342
+ vertical-align: middle;
1343
+ background-color: var(--md-editor-box-shadow-color);
1344
+ }
1348
1345
  .w-md-editor-bar {
1349
1346
  position: absolute;
1350
1347
  cursor: s-resize;
@@ -1364,7 +1361,6 @@ body[data-color-mode*='light'] {
1364
1361
  display: block;
1365
1362
  margin: 0 auto;
1366
1363
  }
1367
-
1368
1364
  .w-md-editor {
1369
1365
  text-align: left;
1370
1366
  border-radius: 3px;
@@ -1466,4 +1462,3 @@ body[data-color-mode*='light'] {
1466
1462
  .w-md-editor-fullscreen .w-md-editor-content {
1467
1463
  height: 100%;
1468
1464
  }
1469
-