@uiw/react-md-editor 4.0.4 → 4.0.6

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 (136) hide show
  1. package/README.md +81 -76
  2. package/dist/mdeditor.css +193 -109
  3. package/dist/mdeditor.js +69395 -66037
  4. package/dist/mdeditor.min.css +1 -1
  5. package/dist/mdeditor.min.js +1 -1
  6. package/dist/mdeditor.min.js.LICENSE.txt +2 -2
  7. package/esm/Context.d.ts +21 -34
  8. package/esm/Editor.js +6 -7
  9. package/esm/Editor.nohighlight.js +5 -6
  10. package/esm/Types.d.ts +1 -1
  11. package/esm/commands/bold.d.ts +1 -1
  12. package/esm/commands/bold.js +1 -1
  13. package/esm/commands/code.d.ts +1 -1
  14. package/esm/commands/code.js +1 -1
  15. package/esm/commands/comment.d.ts +1 -1
  16. package/esm/commands/comment.js +2 -3
  17. package/esm/commands/divider.d.ts +1 -1
  18. package/esm/commands/fullscreen.d.ts +1 -1
  19. package/esm/commands/group.d.ts +2 -2
  20. package/esm/commands/help.d.ts +1 -1
  21. package/esm/commands/hr.d.ts +1 -1
  22. package/esm/commands/hr.js +1 -1
  23. package/esm/commands/image.d.ts +1 -1
  24. package/esm/commands/image.js +1 -1
  25. package/esm/commands/index.cn.js +24 -24
  26. package/esm/commands/index.d.ts +1 -1
  27. package/esm/commands/index.js +25 -25
  28. package/esm/commands/issue.d.ts +1 -1
  29. package/esm/commands/issue.js +3 -3
  30. package/esm/commands/italic.d.ts +1 -1
  31. package/esm/commands/italic.js +1 -1
  32. package/esm/commands/link.d.ts +1 -1
  33. package/esm/commands/link.js +1 -1
  34. package/esm/commands/list.d.ts +1 -1
  35. package/esm/commands/list.js +1 -1
  36. package/esm/commands/preview.d.ts +1 -1
  37. package/esm/commands/preview.js +1 -2
  38. package/esm/commands/quote.d.ts +1 -1
  39. package/esm/commands/quote.js +1 -1
  40. package/esm/commands/strikeThrough.js +1 -1
  41. package/esm/commands/table.js +1 -1
  42. package/esm/commands/title.js +2 -2
  43. package/esm/commands/title1.js +1 -1
  44. package/esm/commands/title2.js +1 -1
  45. package/esm/commands/title3.js +1 -1
  46. package/esm/commands/title4.js +1 -1
  47. package/esm/commands/title5.js +1 -1
  48. package/esm/commands/title6.js +1 -1
  49. package/esm/components/TextArea/Markdown.js +1 -1
  50. package/esm/components/TextArea/Textarea.js +4 -4
  51. package/esm/components/TextArea/handleKeyDown.d.ts +0 -1
  52. package/esm/components/TextArea/handleKeyDown.js +3 -4
  53. package/esm/components/TextArea/index.d.ts +2 -2
  54. package/esm/components/TextArea/index.js +10 -11
  55. package/esm/components/TextArea/index.nohighlight.d.ts +2 -2
  56. package/esm/components/TextArea/index.nohighlight.js +8 -8
  57. package/esm/components/TextArea/shortcuts.d.ts +1 -2
  58. package/esm/components/Toolbar/Child.d.ts +1 -1
  59. package/esm/components/Toolbar/Child.js +2 -2
  60. package/esm/components/Toolbar/index.d.ts +1 -1
  61. package/esm/components/Toolbar/index.js +3 -4
  62. package/esm/index.css +0 -1
  63. package/esm/index.d.ts +2 -2
  64. package/esm/index.js +10 -10
  65. package/esm/index.nohighlight.d.ts +2 -2
  66. package/esm/index.nohighlight.js +8 -8
  67. package/esm/utils/markdownUtils.d.ts +1 -2
  68. package/lib/Context.d.ts +21 -34
  69. package/lib/Editor.js +4 -4
  70. package/lib/Editor.nohighlight.js +3 -3
  71. package/lib/Types.d.ts +1 -1
  72. package/lib/commands/bold.d.ts +1 -1
  73. package/lib/commands/code.d.ts +1 -1
  74. package/lib/commands/comment.d.ts +1 -1
  75. package/lib/commands/divider.d.ts +1 -1
  76. package/lib/commands/fullscreen.d.ts +1 -1
  77. package/lib/commands/group.d.ts +2 -2
  78. package/lib/commands/help.d.ts +1 -1
  79. package/lib/commands/hr.d.ts +1 -1
  80. package/lib/commands/image.d.ts +1 -1
  81. package/lib/commands/index.d.ts +1 -1
  82. package/lib/commands/index.js +2 -4
  83. package/lib/commands/issue.d.ts +1 -1
  84. package/lib/commands/issue.js +2 -2
  85. package/lib/commands/italic.d.ts +1 -1
  86. package/lib/commands/link.d.ts +1 -1
  87. package/lib/commands/list.d.ts +1 -1
  88. package/lib/commands/preview.d.ts +1 -1
  89. package/lib/commands/quote.d.ts +1 -1
  90. package/lib/components/TextArea/Textarea.js +1 -1
  91. package/lib/components/TextArea/handleKeyDown.d.ts +0 -1
  92. package/lib/components/TextArea/handleKeyDown.js +1 -1
  93. package/lib/components/TextArea/index.d.ts +2 -2
  94. package/lib/components/TextArea/index.js +5 -5
  95. package/lib/components/TextArea/index.nohighlight.d.ts +2 -2
  96. package/lib/components/TextArea/index.nohighlight.js +5 -5
  97. package/lib/components/TextArea/shortcuts.d.ts +1 -2
  98. package/lib/components/Toolbar/Child.d.ts +1 -1
  99. package/lib/components/Toolbar/index.d.ts +1 -1
  100. package/lib/index.d.ts +2 -2
  101. package/lib/index.js +1 -1
  102. package/lib/index.nohighlight.d.ts +2 -2
  103. package/lib/index.nohighlight.js +1 -1
  104. package/lib/utils/markdownUtils.d.ts +1 -2
  105. package/markdown-editor.css +0 -1
  106. package/package.json +1 -1
  107. package/src/Context.tsx +1 -1
  108. package/src/Editor.nohighlight.tsx +3 -3
  109. package/src/Editor.tsx +4 -4
  110. package/src/Types.ts +1 -1
  111. package/src/commands/bold.tsx +1 -1
  112. package/src/commands/code.tsx +1 -1
  113. package/src/commands/comment.tsx +1 -1
  114. package/src/commands/divider.tsx +1 -1
  115. package/src/commands/fullscreen.tsx +2 -2
  116. package/src/commands/group.tsx +1 -1
  117. package/src/commands/help.tsx +1 -1
  118. package/src/commands/hr.tsx +1 -1
  119. package/src/commands/image.tsx +1 -1
  120. package/src/commands/index.ts +1 -1
  121. package/src/commands/issue.tsx +3 -3
  122. package/src/commands/italic.tsx +1 -1
  123. package/src/commands/link.tsx +1 -1
  124. package/src/commands/list.tsx +1 -1
  125. package/src/commands/preview.tsx +2 -2
  126. package/src/commands/quote.tsx +1 -1
  127. package/src/components/TextArea/Textarea.tsx +1 -1
  128. package/src/components/TextArea/handleKeyDown.tsx +1 -1
  129. package/src/components/TextArea/index.nohighlight.tsx +2 -2
  130. package/src/components/TextArea/index.tsx +2 -2
  131. package/src/components/TextArea/shortcuts.ts +1 -1
  132. package/src/components/Toolbar/Child.tsx +1 -1
  133. package/src/components/Toolbar/index.tsx +1 -1
  134. package/src/index.nohighlight.tsx +2 -2
  135. package/src/index.tsx +2 -2
  136. package/src/utils/markdownUtils.ts +1 -2
package/README.md CHANGED
@@ -54,6 +54,12 @@ A simple markdown editor with preview, implemented with React.js and TypeScript.
54
54
  npm i @uiw/react-md-editor
55
55
  ```
56
56
 
57
+ or
58
+
59
+ ```bash
60
+ yarn add @uiw/react-md-editor
61
+ ```
62
+
57
63
  ### Using
58
64
 
59
65
  [![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?logo=codesandbox)](https://codesandbox.io/embed/markdown-editor-for-react-izdd6?fontsize=14&hidenavigation=1&theme=dark)
@@ -165,6 +171,29 @@ export default function App() {
165
171
  }
166
172
  ```
167
173
 
174
+ ### Placeholder & maxLength
175
+
176
+ "Below is an example that sets the `placeholder` for the editor and defines the maximum input character length as `10` characters."
177
+
178
+ ```jsx mdx:preview
179
+ import React from "react";
180
+ import MDEditor from '@uiw/react-md-editor';
181
+
182
+ export default function App() {
183
+ const [value, setValue] = React.useState("");
184
+ return (
185
+ <MDEditor
186
+ value={value}
187
+ onChange={setValue}
188
+ textareaProps={{
189
+ placeholder: 'Please enter Markdown text',
190
+ maxLength: 10
191
+ }}
192
+ />
193
+ );
194
+ }
195
+ ```
196
+
168
197
  ### Custom Toolbars
169
198
 
170
199
  [![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?logo=codesandbox)](https://codesandbox.io/embed/react-md-editor-custom-toolbars-m2n10?fontsize=14&hidenavigation=1&theme=dark)
@@ -560,6 +589,30 @@ export default function App() {
560
589
  }
561
590
  ```
562
591
 
592
+ ### Disallowed Elements
593
+
594
+ ```jsx mdx:preview
595
+ import React from "react";
596
+ import MDEditor from '@uiw/react-md-editor';
597
+
598
+ export default function App() {
599
+ const [value, setValue] = React.useState("**Hello world!!!** <style>body{display:none;}</style> ");
600
+ return (
601
+ <div className="container">
602
+ <MDEditor
603
+ value={value}
604
+ height="100%"
605
+ previewOptions={{
606
+ disallowedElements: ['style'],
607
+ }}
608
+ visibleDragbar={false}
609
+ onChange={setValue}
610
+ />
611
+ </div>
612
+ );
613
+ }
614
+ ```
615
+
563
616
  ### Preview Markdown
564
617
 
565
618
  [![Open in CodeSandbox](https://img.shields.io/badge/Open%20in-CodeSandbox-blue?logo=codesandbox)](https://codesandbox.io/embed/react-md-editor-preview-markdown-vrucl?fontsize=14&hidenavigation=1&theme=dark)
@@ -885,7 +938,7 @@ Inherit custom color variables by adding [`.wmde-markdown-var`](https://github.c
885
938
  - `overflow?: boolean=true`: Disable `fullscreen` setting body styles
886
939
  - `preview?: 'live' | 'edit' | 'preview'`: Default value `live`, Show markdown preview.
887
940
  - `maxHeight?: number=1200`: Maximum drag height. The `visibleDragbar=true` value is valid.
888
- - `minHeights?: number=100`: Minimum drag height. The `visibleDragbar=true` value is valid.
941
+ - `minHeight?: number=100`: Minimum drag height. The `visibleDragbar=true` value is valid.
889
942
  - `tabSize?: number=2`: The number of characters to insert when pressing tab key. Default `2` spaces.
890
943
  - `defaultTabEnable?: boolean=false`: If `false`, the `tab` key inserts a tab character into the textarea. If `true`, the `tab` key executes default behavior e.g. focus shifts to next element.
891
944
  - `hideToolbar?: boolean=false`: Option to hide the tool bar.
@@ -928,81 +981,33 @@ npm run start
928
981
 
929
982
  As always, thanks to our amazing contributors!
930
983
 
931
- <!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT--><a href="https://github.com/jaywcjlove" title="小弟调调">
932
- <img src="https://avatars.githubusercontent.com/u/1680273?v=4" width="42;" alt="小弟调调"/>
933
- </a>
934
- <a href="https://github.com/renovate-bot" title="Mend Renovate">
935
- <img src="https://avatars.githubusercontent.com/u/25180681?v=4" width="42;" alt="Mend Renovate"/>
936
- </a>
937
- <a href="https://github.com/stevemk14ebr" title="Stephen Eckels">
938
- <img src="https://avatars.githubusercontent.com/u/6619205?v=4" width="42;" alt="Stephen Eckels"/>
939
- </a>
940
- <a href="https://github.com/avalero" title="Alberto Valero Gómez">
941
- <img src="https://avatars.githubusercontent.com/u/1442682?v=4" width="42;" alt="Alberto Valero Gómez"/>
942
- </a>
943
- <a href="https://github.com/alphacoma18" title="Alpha Romer Coma">
944
- <img src="https://avatars.githubusercontent.com/u/108984668?v=4" width="42;" alt="Alpha Romer Coma"/>
945
- </a>
946
- <a href="https://github.com/RARgames" title="RAR">
947
- <img src="https://avatars.githubusercontent.com/u/13639766?v=4" width="42;" alt="RAR"/>
948
- </a>
949
- <a href="https://github.com/Exmirai" title="UniqueUlysees">
950
- <img src="https://avatars.githubusercontent.com/u/6436703?v=4" width="42;" alt="UniqueUlysees"/>
951
- </a>
952
- <a href="https://github.com/nuragic" title="Andrea Puddu">
953
- <img src="https://avatars.githubusercontent.com/u/1586378?v=4" width="42;" alt="Andrea Puddu"/>
954
- </a>
955
- <a href="https://github.com/bramus" title="Bramus">
956
- <img src="https://avatars.githubusercontent.com/u/213073?v=4" width="42;" alt="Bramus"/>
957
- </a>
958
- <a href="https://github.com/CarleneCannon-Conner" title="Carlene Cannon-Conner">
959
- <img src="https://avatars.githubusercontent.com/u/1942791?v=4" width="42;" alt="Carlene Cannon-Conner"/>
960
- </a>
961
- <a href="https://github.com/MercierCorentin" title="Corentin Mercier">
962
- <img src="https://avatars.githubusercontent.com/u/46066895?v=4" width="42;" alt="Corentin Mercier"/>
963
- </a>
964
- <a href="https://github.com/dmitriyyan" title="Dmitrii Ianushkevich">
965
- <img src="https://avatars.githubusercontent.com/u/89025862?v=4" width="42;" alt="Dmitrii Ianushkevich"/>
966
- </a>
967
- <a href="https://github.com/jnishiyama" title="James Finucane">
968
- <img src="https://avatars.githubusercontent.com/u/2048195?v=4" width="42;" alt="James Finucane"/>
969
- </a>
970
- <a href="https://github.com/allforabit" title="Kevin Nolan">
971
- <img src="https://avatars.githubusercontent.com/u/537189?v=4" width="42;" alt="Kevin Nolan"/>
972
- </a>
973
- <a href="https://github.com/kseikyo" title="Lucas Sierota">
974
- <img src="https://avatars.githubusercontent.com/u/29212286?v=4" width="42;" alt="Lucas Sierota"/>
975
- </a>
976
- <a href="https://github.com/michaelkramer" title="Michael Kramer">
977
- <img src="https://avatars.githubusercontent.com/u/6052223?v=4" width="42;" alt="Michael Kramer"/>
978
- </a>
979
- <a href="https://github.com/peterj" title="Peter Jausovec">
980
- <img src="https://avatars.githubusercontent.com/u/11080940?v=4" width="42;" alt="Peter Jausovec"/>
981
- </a>
982
- <a href="https://github.com/phillipb" title="Phillip Burch">
983
- <img src="https://avatars.githubusercontent.com/u/1482089?v=4" width="42;" alt="Phillip Burch"/>
984
- </a>
985
- <a href="https://github.com/psycho-baller" title="Rami Maalouf">
986
- <img src="https://avatars.githubusercontent.com/u/81759594?v=4" width="42;" alt="Rami Maalouf"/>
987
- </a>
988
- <a href="https://github.com/toresbe" title="Tore Sinding Bekkedal">
989
- <img src="https://avatars.githubusercontent.com/u/1761606?v=4" width="42;" alt="Tore Sinding Bekkedal"/>
990
- </a>
991
- <a href="https://github.com/valenfv" title="Valentin">
992
- <img src="https://avatars.githubusercontent.com/u/34139820?v=4" width="42;" alt="Valentin"/>
993
- </a>
994
- <a href="https://github.com/jmtes" title="juno tesoro">
995
- <img src="https://avatars.githubusercontent.com/u/38450133?v=4" width="42;" alt="juno tesoro"/>
996
- </a>
997
- <a href="https://github.com/juspky" title="juspky">
998
- <img src="https://avatars.githubusercontent.com/u/11074890?v=4" width="42;" alt="juspky"/>
999
- </a>
1000
- <a href="https://github.com/ryicoh" title="ryicoh">
1001
- <img src="https://avatars.githubusercontent.com/u/37844673?v=4" width="42;" alt="ryicoh"/>
1002
- </a>
1003
- <a href="https://github.com/wj0990" title="wangjie">
1004
- <img src="https://avatars.githubusercontent.com/u/8792016?v=4" width="42;" alt="wangjie"/>
1005
- </a><!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->
984
+ <!--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>
985
+ <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>
986
+ <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>
987
+ <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>
988
+ <a href="https://github.com/RARgames" title="RAR"><img src="https://avatars.githubusercontent.com/u/13639766?v=4" width="42;" alt="RAR"/></a>
989
+ <a href="https://github.com/Exmirai" title="UniqueUlysees"><img src="https://avatars.githubusercontent.com/u/6436703?v=4" width="42;" alt="UniqueUlysees"/></a>
990
+ <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>
991
+ <a href="https://github.com/nuragic" title="Andrea Puddu"><img src="https://avatars.githubusercontent.com/u/1586378?v=4" width="42;" alt="Andrea Puddu"/></a>
992
+ <a href="https://github.com/AntonR31337" title="Anton"><img src="https://avatars.githubusercontent.com/u/88384647?v=4" width="42;" alt="Anton"/></a>
993
+ <a href="https://github.com/bramus" title="Bramus"><img src="https://avatars.githubusercontent.com/u/213073?v=4" width="42;" alt="Bramus"/></a>
994
+ <a href="https://github.com/CarleneCannon-Conner" title="Carlene Cannon-Conner"><img src="https://avatars.githubusercontent.com/u/1942791?v=4" width="42;" alt="Carlene Cannon-Conner"/></a>
995
+ <a href="https://github.com/MercierCorentin" title="Corentin Mercier"><img src="https://avatars.githubusercontent.com/u/46066895?v=4" width="42;" alt="Corentin Mercier"/></a>
996
+ <a href="https://github.com/dmitriyyan" title="Dmitrii Yanushkevich"><img src="https://avatars.githubusercontent.com/u/89025862?v=4" width="42;" alt="Dmitrii Yanushkevich"/></a>
997
+ <a href="https://github.com/jnishiyama" title="James Finucane"><img src="https://avatars.githubusercontent.com/u/2048195?v=4" width="42;" alt="James Finucane"/></a>
998
+ <a href="https://github.com/allforabit" title="Kevin Nolan"><img src="https://avatars.githubusercontent.com/u/537189?v=4" width="42;" alt="Kevin Nolan"/></a>
999
+ <a href="https://github.com/liamstamper" title="Liam Stamper"><img src="https://avatars.githubusercontent.com/u/136619788?v=4" width="42;" alt="Liam Stamper"/></a>
1000
+ <a href="https://github.com/kseikyo" title="Lucas Sierota"><img src="https://avatars.githubusercontent.com/u/29212286?v=4" width="42;" alt="Lucas Sierota"/></a>
1001
+ <a href="https://github.com/michaelkramer" title="Michael Kramer"><img src="https://avatars.githubusercontent.com/u/6052223?v=4" width="42;" alt="Michael Kramer"/></a>
1002
+ <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>
1003
+ <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>
1004
+ <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>
1005
+ <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>
1006
+ <a href="https://github.com/valenfv" title="Valentin"><img src="https://avatars.githubusercontent.com/u/34139820?v=4" width="42;" alt="Valentin"/></a>
1007
+ <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>
1008
+ <a href="https://github.com/juspky" title="juspky"><img src="https://avatars.githubusercontent.com/u/11074890?v=4" width="42;" alt="juspky"/></a>
1009
+ <a href="https://github.com/ryicoh" title="ryicoh"><img src="https://avatars.githubusercontent.com/u/37844673?v=4" width="42;" alt="ryicoh"/></a>
1010
+ <a href="https://github.com/wj0990" title="wangjie"><img src="https://avatars.githubusercontent.com/u/8792016?v=4" width="42;" alt="wangjie"/></a><!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->
1006
1011
 
1007
1012
  Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
1008
1013
 
package/dist/mdeditor.css CHANGED
@@ -44,6 +44,13 @@
44
44
  --color-accent-emphasis: #1f6feb;
45
45
  --color-attention-subtle: rgba(187, 128, 9, 0.15);
46
46
  --color-danger-fg: #f85149;
47
+ --color-danger-emphasis: #da3633;
48
+ --color-attention-fg: #d29922;
49
+ --color-attention-emphasis: #9e6a03;
50
+ --color-done-fg: #a371f7;
51
+ --color-done-emphasis: #8957e5;
52
+ --color-success-fg: #3fb950;
53
+ --color-success-emphasis: #238636;
47
54
  --color-copied-active-bg: #2e9b33;
48
55
  }
49
56
  }
@@ -92,7 +99,14 @@
92
99
  --color-accent-fg: #0969da;
93
100
  --color-accent-emphasis: #0969da;
94
101
  --color-attention-subtle: #fff8c5;
95
- --color-danger-fg: #cf222e;
102
+ --color-danger-fg: #d1242f;
103
+ --color-danger-emphasis: #cf222e;
104
+ --color-attention-fg: #9a6700;
105
+ --color-attention-emphasis: #9a6700;
106
+ --color-done-fg: #8250df;
107
+ --color-done-emphasis: #8250df;
108
+ --color-success-fg: #1a7f37;
109
+ --color-success-emphasis: #1f883d;
96
110
  --color-copied-active-bg: #2e9b33;
97
111
  }
98
112
  }
@@ -196,7 +210,7 @@ body[data-color-mode*='light'] {
196
210
  }
197
211
  .wmde-markdown {
198
212
  -webkit-text-size-adjust: 100%;
199
- font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
213
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
200
214
  font-size: 16px;
201
215
  line-height: 1.5;
202
216
  word-wrap: break-word;
@@ -805,6 +819,15 @@ body[data-color-mode*='light'] {
805
819
  overflow: auto;
806
820
  display: block;
807
821
  }
822
+ .wmde-markdown pre > code::-webkit-scrollbar {
823
+ background: transparent;
824
+ width: 8px;
825
+ height: 8px;
826
+ }
827
+ .wmde-markdown pre > code::-webkit-scrollbar-thumb {
828
+ background: var(--color-fg-muted);
829
+ border-radius: 10px;
830
+ }
808
831
  .wmde-markdown .csv-data td,
809
832
  .wmde-markdown .csv-data th {
810
833
  padding: 5px;
@@ -924,6 +947,67 @@ body[data-color-mode*='light'] {
924
947
  .wmde-markdown pre .active .octicon-check {
925
948
  display: block;
926
949
  }
950
+ .wmde-markdown .markdown-alert {
951
+ padding: 0.5rem 1em;
952
+ color: inherit;
953
+ margin-bottom: 16px;
954
+ border-left: 0.25em solid var(--color-border-default);
955
+ border-left: 0.25em solid var(--borderColor-default, var(--color-border-default));
956
+ }
957
+ .wmde-markdown .markdown-alert > :last-child {
958
+ margin-bottom: 0 !important;
959
+ }
960
+ .wmde-markdown .markdown-alert .markdown-alert-title {
961
+ display: flex;
962
+ align-items: center;
963
+ line-height: 1;
964
+ font-weight: 500;
965
+ font-size: 14px;
966
+ }
967
+ .wmde-markdown .markdown-alert .markdown-alert-title svg.octicon {
968
+ margin-right: 8px !important;
969
+ margin-right: var(--base-size-8, 8px) !important;
970
+ }
971
+ .wmde-markdown .markdown-alert.markdown-alert-note {
972
+ border-left-color: var(--color-accent-emphasis);
973
+ border-left-color: var(--borderColor-accent-emphasis, var(--color-accent-emphasis));
974
+ }
975
+ .wmde-markdown .markdown-alert.markdown-alert-note .markdown-alert-title {
976
+ color: var(--color-accent-fg);
977
+ color: var(--fgColor-accent, var(--color-accent-fg));
978
+ }
979
+ .wmde-markdown .markdown-alert.markdown-alert-tip {
980
+ border-left-color: var(--color-success-emphasis);
981
+ border-left-color: var(--borderColor-success-emphasis, var(--color-success-emphasis));
982
+ }
983
+ .wmde-markdown .markdown-alert.markdown-alert-tip .markdown-alert-title {
984
+ color: var(--color-success-fg);
985
+ color: var(--fgColor-success, var(--color-success-fg));
986
+ }
987
+ .wmde-markdown .markdown-alert.markdown-alert-important {
988
+ border-left-color: var(--color-done-emphasis);
989
+ border-left-color: var(--borderColor-done-emphasis, var(--color-done-emphasis));
990
+ }
991
+ .wmde-markdown .markdown-alert.markdown-alert-important .markdown-alert-title {
992
+ color: var(--color-done-fg);
993
+ color: var(--fgColor-done, var(--color-done-fg));
994
+ }
995
+ .wmde-markdown .markdown-alert.markdown-alert-warning {
996
+ border-left-color: var(--color-attention-emphasis);
997
+ border-left-color: var(--borderColor-attention-emphasis, var(--color-attention-emphasis));
998
+ }
999
+ .wmde-markdown .markdown-alert.markdown-alert-warning .markdown-alert-title {
1000
+ color: var(--color-attention-fg);
1001
+ color: var(--fgColor-attention, var(--color-attention-fg));
1002
+ }
1003
+ .wmde-markdown .markdown-alert.markdown-alert-caution {
1004
+ border-left-color: var(--color-danger-emphasis);
1005
+ border-left-color: var(--borderColor-danger-emphasis, var(--color-danger-emphasis));
1006
+ }
1007
+ .wmde-markdown .markdown-alert.markdown-alert-caution .markdown-alert-title {
1008
+ color: var(--color-danger-fg);
1009
+ color: var(--fgColor-danger, var(--color-danger-fg));
1010
+ }
927
1011
  .wmde-markdown .highlight-line {
928
1012
  background-color: var(--color-neutral-muted);
929
1013
  }
@@ -1015,6 +1099,113 @@ body[data-color-mode*='light'] {
1015
1099
  cursor: help;
1016
1100
  }
1017
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
+
1018
1209
  .w-md-editor-area {
1019
1210
  overflow: auto;
1020
1211
  border-radius: 5px;
@@ -1154,113 +1345,6 @@ body[data-color-mode*='light'] {
1154
1345
  color: var(--color-prettylights-syntax-markup-deleted-text, #82071e) !important;
1155
1346
  }
1156
1347
 
1157
- .w-md-editor-toolbar-child {
1158
- position: absolute;
1159
- border-radius: 3px;
1160
- 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);
1161
- background-color: var(--md-editor-background-color);
1162
- z-index: 1;
1163
- display: none;
1164
- }
1165
- .w-md-editor-toolbar-child.active {
1166
- display: block;
1167
- }
1168
- .w-md-editor-toolbar-child .w-md-editor-toolbar {
1169
- border-bottom: 0;
1170
- padding: 3px;
1171
- border-radius: 3px;
1172
- }
1173
- .w-md-editor-toolbar-child .w-md-editor-toolbar ul > li {
1174
- display: block;
1175
- }
1176
- .w-md-editor-toolbar-child .w-md-editor-toolbar ul > li button {
1177
- width: -webkit-fill-available;
1178
- height: auto;
1179
- height: initial;
1180
- box-sizing: border-box;
1181
- padding: 3px 4px 2px 4px;
1182
- margin: 0;
1183
- }
1184
-
1185
- .w-md-editor-toolbar {
1186
- border-bottom: 1px solid var(--md-editor-box-shadow-color);
1187
- background-color: var(--md-editor-background-color);
1188
- padding: 3px;
1189
- display: flex;
1190
- justify-content: space-between;
1191
- align-items: center;
1192
- border-radius: 3px 3px 0 0;
1193
- -webkit-user-select: none;
1194
- -moz-user-select: none;
1195
- user-select: none;
1196
- flex-wrap: wrap;
1197
- }
1198
- .w-md-editor-toolbar.bottom {
1199
- border-bottom: 0px;
1200
- border-top: 1px solid var(--md-editor-box-shadow-color);
1201
- border-radius: 0 0 3px 3px;
1202
- }
1203
- .w-md-editor-toolbar ul,
1204
- .w-md-editor-toolbar li {
1205
- margin: 0;
1206
- padding: 0;
1207
- list-style: none;
1208
- line-height: normal;
1209
- line-height: initial;
1210
- }
1211
- .w-md-editor-toolbar li {
1212
- display: inline-block;
1213
- font-size: 14px;
1214
- }
1215
- .w-md-editor-toolbar li + li {
1216
- margin: 0;
1217
- }
1218
- .w-md-editor-toolbar li > button {
1219
- border: none;
1220
- height: 20px;
1221
- line-height: 14px;
1222
- background: none;
1223
- padding: 4px;
1224
- margin: 0 1px;
1225
- border-radius: 2px;
1226
- text-transform: none;
1227
- font-weight: normal;
1228
- overflow: visible;
1229
- outline: none;
1230
- cursor: pointer;
1231
- transition: all 0.3s;
1232
- white-space: nowrap;
1233
- color: var(--color-fg-default);
1234
- }
1235
- .w-md-editor-toolbar li > button:hover,
1236
- .w-md-editor-toolbar li > button:focus {
1237
- background-color: var(--color-neutral-muted);
1238
- color: var(--color-accent-fg);
1239
- }
1240
- .w-md-editor-toolbar li > button:active {
1241
- background-color: var(--color-neutral-muted);
1242
- color: var(--color-danger-fg);
1243
- }
1244
- .w-md-editor-toolbar li > button:disabled {
1245
- color: var(--md-editor-box-shadow-color);
1246
- cursor: not-allowed;
1247
- }
1248
- .w-md-editor-toolbar li > button:disabled:hover {
1249
- background-color: transparent;
1250
- color: var(--md-editor-box-shadow-color);
1251
- }
1252
- .w-md-editor-toolbar li.active > button {
1253
- color: var(--color-accent-fg);
1254
- background-color: var(--color-neutral-muted);
1255
- }
1256
- .w-md-editor-toolbar-divider {
1257
- height: 14px;
1258
- width: 1px;
1259
- margin: -3px 3px 0 3px !important;
1260
- vertical-align: middle;
1261
- background-color: var(--md-editor-box-shadow-color);
1262
- }
1263
-
1264
1348
  .w-md-editor-bar {
1265
1349
  position: absolute;
1266
1350
  cursor: s-resize;