@uiw/react-md-editor 3.23.0 → 3.23.2
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.
- package/README.md +38 -0
- package/dist/mdeditor.css +1 -1
- package/dist/mdeditor.js +4135 -1891
- package/dist/mdeditor.min.css +1 -1
- package/dist/mdeditor.min.js +1 -1
- package/esm/commands/index.js +0 -1
- package/esm/index.css +1 -1
- package/esm/index.less +1 -1
- package/lib/commands/index.js +0 -1
- package/lib/index.less +1 -1
- package/markdown-editor.css +1 -1
- package/package.json +1 -1
- package/src/commands/index.ts +0 -1
- package/src/index.less +1 -1
package/README.md
CHANGED
|
@@ -414,6 +414,44 @@ export default function App() {
|
|
|
414
414
|
}
|
|
415
415
|
```
|
|
416
416
|
|
|
417
|
+
Add Help Command Tool
|
|
418
|
+
|
|
419
|
+
[](https://codesandbox.io/embed/markdown-editor-for-react-https-github-com-uiwjs-react-md-editor-issues-530-add-help-command-tool-fpnj22?fontsize=14&hidenavigation=1&theme=dark)
|
|
420
|
+
|
|
421
|
+
```jsx mdx:preview
|
|
422
|
+
import React, { useContext } from "react";
|
|
423
|
+
import MDEditor, { commands } from "@uiw/react-md-editor";
|
|
424
|
+
|
|
425
|
+
const help = {
|
|
426
|
+
name: "help",
|
|
427
|
+
keyCommand: "help",
|
|
428
|
+
buttonProps: { "aria-label": "Insert help" },
|
|
429
|
+
icon: (
|
|
430
|
+
<svg viewBox="0 0 16 16" width="12px" height="12px">
|
|
431
|
+
<path
|
|
432
|
+
d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm.9 13H7v-1.8h1.9V13Zm-.1-3.6v.5H7.1v-.6c.2-2.1 2-1.9 1.9-3.2.1-.7-.3-1.1-1-1.1-.8 0-1.2.7-1.2 1.6H5c0-1.7 1.2-3 2.9-3 2.3 0 3 1.4 3 2.3.1 2.3-1.9 2-2.1 3.5Z"
|
|
433
|
+
fill="currentColor"
|
|
434
|
+
/>
|
|
435
|
+
</svg>
|
|
436
|
+
),
|
|
437
|
+
execute: (state, api) => {
|
|
438
|
+
window.open("https://www.markdownguide.org/basic-syntax/", "_blank");
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
export default function App() {
|
|
443
|
+
const [value, setValue] = React.useState("**Hello world!!!**");
|
|
444
|
+
return (
|
|
445
|
+
<MDEditor
|
|
446
|
+
value={value}
|
|
447
|
+
preview="edit"
|
|
448
|
+
commands={[...commands.getCommands(), help]}
|
|
449
|
+
onChange={(val) => setValue(val)}
|
|
450
|
+
/>
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
417
455
|
### Editor Font Size
|
|
418
456
|
|
|
419
457
|
[](https://codesandbox.io/embed/markdown-editor-for-react-uiwjs-react-md-editor-issues-425-2epmgh?fontsize=14&hidenavigation=1&theme=dark)
|
package/dist/mdeditor.css
CHANGED
|
@@ -1346,7 +1346,7 @@ body[data-color-mode*='light'] {
|
|
|
1346
1346
|
.w-md-editor-preview .anchor {
|
|
1347
1347
|
display: none;
|
|
1348
1348
|
}
|
|
1349
|
-
.w-md-editor-preview .contains-task-list {
|
|
1349
|
+
.w-md-editor-preview .contains-task-list li.task-list-item {
|
|
1350
1350
|
list-style: none;
|
|
1351
1351
|
}
|
|
1352
1352
|
.w-md-editor-show-preview .w-md-editor-input {
|