@uiw/react-md-editor 3.12.0 → 3.12.3

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 (92) hide show
  1. package/dist/mdeditor.css +21 -16
  2. package/dist/mdeditor.js +1345 -265
  3. package/dist/mdeditor.min.css +1 -1
  4. package/dist/mdeditor.min.js +1 -1
  5. package/dist/mdeditor.min.js.LICENSE.txt +10 -15
  6. package/esm/Context.js.map +5 -5
  7. package/esm/Editor.js +5 -9
  8. package/esm/Editor.js.map +6 -6
  9. package/esm/commands/bold.js.map +5 -5
  10. package/esm/commands/code.js +4 -2
  11. package/esm/commands/code.js.map +7 -6
  12. package/esm/commands/comment.js.map +5 -5
  13. package/esm/commands/divider.js.map +5 -5
  14. package/esm/commands/fullscreen.js.map +5 -5
  15. package/esm/commands/group.js.map +5 -5
  16. package/esm/commands/hr.js.map +5 -5
  17. package/esm/commands/image.js.map +5 -5
  18. package/esm/commands/index.js.map +5 -5
  19. package/esm/commands/italic.js.map +5 -5
  20. package/esm/commands/link.js.map +5 -5
  21. package/esm/commands/list.js.map +5 -5
  22. package/esm/commands/preview.js.map +5 -5
  23. package/esm/commands/quote.js.map +5 -5
  24. package/esm/commands/strikeThrough.js.map +5 -5
  25. package/esm/commands/title.js.map +5 -5
  26. package/esm/commands/title1.js.map +5 -5
  27. package/esm/commands/title2.js.map +5 -5
  28. package/esm/commands/title3.js.map +5 -5
  29. package/esm/commands/title4.js.map +5 -5
  30. package/esm/commands/title5.js.map +5 -5
  31. package/esm/commands/title6.js.map +5 -5
  32. package/esm/components/DragBar/index.js.map +5 -5
  33. package/esm/components/TextArea/Markdown.js.map +5 -5
  34. package/esm/components/TextArea/Textarea.js.map +5 -5
  35. package/esm/components/TextArea/handleKeyDown.js.map +5 -5
  36. package/esm/components/TextArea/index.css +8 -1
  37. package/esm/components/TextArea/index.js.map +5 -5
  38. package/esm/components/TextArea/index.less +8 -1
  39. package/esm/components/TextArea/shortcuts.js.map +5 -5
  40. package/esm/components/Toolbar/Child.js.map +5 -5
  41. package/esm/components/Toolbar/index.js.map +5 -5
  42. package/esm/index.css +3 -0
  43. package/esm/index.js.map +5 -5
  44. package/esm/index.less +3 -0
  45. package/esm/utils/InsertTextAtPosition.js.map +5 -5
  46. package/esm/utils/markdownUtils.js.map +5 -5
  47. package/lib/Context.js.map +5 -5
  48. package/lib/Editor.js +9 -9
  49. package/lib/Editor.js.map +6 -6
  50. package/lib/commands/bold.js.map +5 -5
  51. package/lib/commands/code.js +4 -2
  52. package/lib/commands/code.js.map +7 -6
  53. package/lib/commands/comment.js.map +5 -5
  54. package/lib/commands/divider.js.map +5 -5
  55. package/lib/commands/fullscreen.js.map +5 -5
  56. package/lib/commands/group.js.map +5 -5
  57. package/lib/commands/hr.js.map +5 -5
  58. package/lib/commands/image.js.map +5 -5
  59. package/lib/commands/index.js.map +5 -5
  60. package/lib/commands/italic.js.map +5 -5
  61. package/lib/commands/link.js.map +5 -5
  62. package/lib/commands/list.js.map +5 -5
  63. package/lib/commands/preview.js.map +5 -5
  64. package/lib/commands/quote.js.map +5 -5
  65. package/lib/commands/strikeThrough.js.map +5 -5
  66. package/lib/commands/title.js.map +5 -5
  67. package/lib/commands/title1.js.map +5 -5
  68. package/lib/commands/title2.js.map +5 -5
  69. package/lib/commands/title3.js.map +5 -5
  70. package/lib/commands/title4.js.map +5 -5
  71. package/lib/commands/title5.js.map +5 -5
  72. package/lib/commands/title6.js.map +5 -5
  73. package/lib/components/DragBar/index.js.map +5 -5
  74. package/lib/components/TextArea/Markdown.js.map +5 -5
  75. package/lib/components/TextArea/Textarea.js.map +5 -5
  76. package/lib/components/TextArea/handleKeyDown.js.map +5 -5
  77. package/lib/components/TextArea/index.js.map +5 -5
  78. package/lib/components/TextArea/index.less +8 -1
  79. package/lib/components/TextArea/shortcuts.js.map +5 -5
  80. package/lib/components/Toolbar/Child.js.map +5 -5
  81. package/lib/components/Toolbar/index.js.map +5 -5
  82. package/lib/index.js.map +5 -5
  83. package/lib/index.less +3 -0
  84. package/lib/utils/InsertTextAtPosition.js.map +5 -5
  85. package/lib/utils/markdownUtils.js.map +5 -5
  86. package/markdown-editor.css +11 -1
  87. package/package.json +11 -11
  88. package/src/Editor.tsx +6 -7
  89. package/src/__test__/editor.test.tsx +1 -1
  90. package/src/commands/code.tsx +2 -2
  91. package/src/components/TextArea/index.less +8 -1
  92. package/src/index.less +3 -0
package/dist/mdeditor.css CHANGED
@@ -190,7 +190,7 @@ body[data-color-mode*='light'] {
190
190
  }
191
191
  .wmde-markdown {
192
192
  -webkit-text-size-adjust: 100%;
193
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
193
+ font-family: -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
194
194
  font-size: 16px;
195
195
  line-height: 1.5;
196
196
  word-wrap: break-word;
@@ -789,17 +789,7 @@ body[data-color-mode*='light'] {
789
789
  background: transparent;
790
790
  border: 0;
791
791
  }
792
- .wmde-markdown .highlight {
793
- margin-bottom: 16px;
794
- }
795
- .wmde-markdown .highlight pre {
796
- margin-bottom: 0;
797
- word-break: normal;
798
- }
799
- .wmde-markdown .highlight pre,
800
792
  .wmde-markdown pre {
801
- padding: 16px;
802
- overflow: auto;
803
793
  font-size: 85%;
804
794
  line-height: 1.45;
805
795
  background-color: var(--color-canvas-subtle);
@@ -817,6 +807,11 @@ body[data-color-mode*='light'] {
817
807
  background-color: transparent;
818
808
  border: 0;
819
809
  }
810
+ .wmde-markdown pre > code {
811
+ padding: 16px;
812
+ overflow: auto;
813
+ display: block;
814
+ }
820
815
  .wmde-markdown .csv-data td,
821
816
  .wmde-markdown .csv-data th {
822
817
  padding: 5px;
@@ -1072,8 +1067,15 @@ body[data-color-mode*='light'] {
1072
1067
  }
1073
1068
  .w-md-editor-text-pre {
1074
1069
  position: relative;
1075
- margin: 0px;
1070
+ margin: 0px !important;
1076
1071
  pointer-events: none;
1072
+ background-color: transparent !important;
1073
+ }
1074
+ .w-md-editor-text-pre > code {
1075
+ padding: 0 !important;
1076
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
1077
+ font-size: 14px !important;
1078
+ line-height: 18px !important;
1077
1079
  }
1078
1080
  .w-md-editor-text-input {
1079
1081
  position: absolute;
@@ -1129,12 +1131,12 @@ body[data-color-mode*='light'] {
1129
1131
  color: var(--color-prettylights-syntax-entity);
1130
1132
  }
1131
1133
  .w-md-editor-text-pre .token.bold {
1132
- font-weight: unset !important;
1134
+ font-weight: inherit !important;
1133
1135
  }
1134
1136
  .w-md-editor-text-pre .token.title {
1135
- line-height: unset !important;
1136
- font-size: unset !important;
1137
- font-weight: unset !important;
1137
+ line-height: inherit !important;
1138
+ font-size: inherit !important;
1139
+ font-weight: inherit !important;
1138
1140
  }
1139
1141
  .w-md-editor-text-pre .token.code.keyword {
1140
1142
  color: var(--color-prettylights-syntax-constant) !important;
@@ -1291,6 +1293,9 @@ body[data-color-mode*='light'] {
1291
1293
  top: 0;
1292
1294
  right: 0;
1293
1295
  bottom: 0;
1296
+ border-radius: 0 0 5px 0;
1297
+ display: flex;
1298
+ flex-direction: column;
1294
1299
  }
1295
1300
  .w-md-editor-preview .anchor {
1296
1301
  display: none;