@uiw/react-md-editor 4.0.7 → 4.0.8
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 +36 -1
- package/commands.d.ts +14 -7
- package/dist/mdeditor.js +53 -11
- package/dist/mdeditor.min.js +1 -1
- package/esm/commands/index.cn.js +4 -4
- package/esm/commands/index.d.ts +8 -8
- package/esm/commands/index.js +8 -8
- package/esm/commands/title.d.ts +7 -1
- package/esm/commands/title.js +11 -4
- package/esm/commands/title1.d.ts +6 -0
- package/esm/commands/title1.js +16 -9
- package/esm/commands/title2.d.ts +6 -0
- package/esm/commands/title2.js +16 -9
- package/esm/commands/title3.d.ts +6 -0
- package/esm/commands/title3.js +16 -9
- package/esm/commands/title4.d.ts +6 -0
- package/esm/commands/title4.js +16 -9
- package/esm/commands/title5.d.ts +6 -0
- package/esm/commands/title5.js +16 -9
- package/esm/commands/title6.d.ts +6 -0
- package/esm/commands/title6.js +16 -9
- package/esm/index.css +0 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/lib/commands/index.cn.js +4 -4
- package/lib/commands/index.d.ts +8 -8
- package/lib/commands/index.js +42 -0
- package/lib/commands/title.d.ts +7 -1
- package/lib/commands/title.js +12 -4
- package/lib/commands/title1.d.ts +6 -0
- package/lib/commands/title1.js +16 -9
- package/lib/commands/title2.d.ts +6 -0
- package/lib/commands/title2.js +16 -9
- package/lib/commands/title3.d.ts +6 -0
- package/lib/commands/title3.js +16 -9
- package/lib/commands/title4.d.ts +6 -0
- package/lib/commands/title4.js +16 -9
- package/lib/commands/title5.d.ts +6 -0
- package/lib/commands/title5.js +16 -9
- package/lib/commands/title6.d.ts +6 -0
- package/lib/commands/title6.js +16 -9
- package/lib/index.d.ts +1 -0
- package/lib/index.js +9 -1
- package/markdown-editor.css +0 -1
- package/nohighlight.d.ts +2 -0
- package/package.json +1 -1
- package/src/commands/index.cn.ts +3 -3
- package/src/commands/index.ts +14 -7
- package/src/commands/title.tsx +11 -4
- package/src/commands/title1.tsx +14 -7
- package/src/commands/title2.tsx +14 -7
- package/src/commands/title3.tsx +14 -7
- package/src/commands/title4.tsx +14 -7
- package/src/commands/title5.tsx +14 -7
- package/src/commands/title6.tsx +14 -7
- package/src/index.tsx +1 -0
package/src/commands/title5.tsx
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { headingExecute } from '../commands/title';
|
|
3
3
|
import { ICommand, ExecuteState, TextAreaTextApi } from './';
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
name: '
|
|
7
|
-
keyCommand: '
|
|
5
|
+
export const heading5: ICommand = {
|
|
6
|
+
name: 'heading5',
|
|
7
|
+
keyCommand: 'heading5',
|
|
8
8
|
shortcuts: 'ctrlcmd+5',
|
|
9
9
|
prefix: '##### ',
|
|
10
10
|
suffix: '',
|
|
11
|
-
buttonProps: { 'aria-label': 'Insert
|
|
12
|
-
icon: <div style={{ fontSize: 12, textAlign: 'left' }}>
|
|
11
|
+
buttonProps: { 'aria-label': 'Insert Heading 5 (ctrl + 5)', title: 'Insert Heading 5 (ctrl + 5)' },
|
|
12
|
+
icon: <div style={{ fontSize: 12, textAlign: 'left' }}>Heading 5</div>,
|
|
13
13
|
execute: (state: ExecuteState, api: TextAreaTextApi) => {
|
|
14
|
-
|
|
14
|
+
headingExecute({ state, api, prefix: state.command.prefix!, suffix: state.command.suffix });
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `heading5` instead.
|
|
20
|
+
* This command is now deprecated and will be removed in future versions.
|
|
21
|
+
* Use `title5` for inserting Heading 5.
|
|
22
|
+
*/
|
|
23
|
+
export const title5: ICommand = heading5;
|
package/src/commands/title6.tsx
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { headingExecute } from '../commands/title';
|
|
3
3
|
import { ICommand, ExecuteState, TextAreaTextApi } from './';
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
name: '
|
|
7
|
-
keyCommand: '
|
|
5
|
+
export const heading6: ICommand = {
|
|
6
|
+
name: 'heading6',
|
|
7
|
+
keyCommand: 'heading6',
|
|
8
8
|
shortcuts: 'ctrlcmd+6',
|
|
9
9
|
prefix: '###### ',
|
|
10
10
|
suffix: '',
|
|
11
|
-
buttonProps: { 'aria-label': 'Insert
|
|
12
|
-
icon: <div style={{ fontSize: 12, textAlign: 'left' }}>
|
|
11
|
+
buttonProps: { 'aria-label': 'Insert Heading 6 (ctrl + 6)', title: 'Insert Heading 6 (ctrl + 6)' },
|
|
12
|
+
icon: <div style={{ fontSize: 12, textAlign: 'left' }}>Heading 6</div>,
|
|
13
13
|
execute: (state: ExecuteState, api: TextAreaTextApi) => {
|
|
14
|
-
|
|
14
|
+
headingExecute({ state, api, prefix: state.command.prefix!, suffix: state.command.suffix });
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `heading6` instead.
|
|
20
|
+
* This command is now deprecated and will be removed in future versions.
|
|
21
|
+
* Use `title6` for inserting Heading 6.
|
|
22
|
+
*/
|
|
23
|
+
export const title6: ICommand = heading6;
|
package/src/index.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import * as commands from './commands/';
|
|
|
3
3
|
import * as MarkdownUtil from './utils/markdownUtils';
|
|
4
4
|
import './index.less';
|
|
5
5
|
|
|
6
|
+
export { headingExecute } from './commands/title';
|
|
6
7
|
export * from './commands/';
|
|
7
8
|
export * from './commands/group';
|
|
8
9
|
export * from './utils/markdownUtils';
|