@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/README.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
<div markdown="1">
|
|
2
|
+
<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
|
+
<br>
|
|
4
|
+
<a target="_blank" href="https://apps.apple.com/app/Vidwall/6747587746" title="Vidwall for macOS"><img align="center" alt="Vidwall" height="52" width="52" src="https://github.com/user-attachments/assets/7b5df70a-ed91-4d4b-85be-f00e60a09ce9"></a>
|
|
5
|
+
<a target="_blank" href="https://wangchujiang.com/mousio-hint/" title="Mousio Hint for macOS"><img align="center" alt="Mousio Hint" height="52" width="52" src="https://github.com/user-attachments/assets/3c0af128-0cef-44e5-a8db-4741dc5a6690"></a>
|
|
6
|
+
<a target="_blank" href="https://apps.apple.com/app/6746747327" title="Mousio for macOS"><img align="center" alt="Mousio" height="52" width="52" src="https://github.com/user-attachments/assets/9edf61ff-5a6c-4676-9cc2-8fd3c1ad0dfb"></a>
|
|
7
|
+
<a target="_blank" href="https://apps.apple.com/app/6745227444" title="Musicer for macOS"><img align="center" alt="Musicer" height="52" width="52" src="https://github.com/user-attachments/assets/b7abfba8-88ff-4c86-a125-43073d5aef22"></a>
|
|
8
|
+
<a target="_blank" href="https://apps.apple.com/app/6743841447" title="Audioer for macOS"><img align="center" alt="Audioer" height="52" width="52" src="https://github.com/user-attachments/assets/7a836865-8c90-4119-87bc-19e06a76c957"></a>
|
|
9
|
+
<a target="_blank" href="https://apps.apple.com/app/6744690194" title="FileSentinel for macOS"><img align="center" alt="FileSentinel" height="52" width="52" src="https://github.com/user-attachments/assets/28bce2cc-290e-45bf-9068-585ff6ecafe9"></a>
|
|
10
|
+
<a target="_blank" href="https://apps.apple.com/app/6743495172" title="FocusCursor for macOS"><img align="center" alt="FocusCursor" height="52" width="52" src="https://github.com/user-attachments/assets/d543668a-737b-4853-a6bb-eaa269e69836"></a>
|
|
11
|
+
<a target="_blank" href="https://apps.apple.com/app/6742680573" title="Videoer for macOS"><img align="center" alt="Videoer" height="52" width="52" src="https://github.com/user-attachments/assets/10ffb0f1-0625-40d6-93f1-2c2496592595"></a>
|
|
12
|
+
<a target="_blank" href="https://apps.apple.com/app/6740425504" title="KeyClicker for macOS"><img align="center" alt="KeyClicker" height="52" width="52" src="https://github.com/user-attachments/assets/5a19fcb9-cb81-4855-b4ea-31c604d9612a"></a>
|
|
13
|
+
<a target="_blank" href="https://apps.apple.com/app/6739052447" title="DayBar for macOS"><img align="center" alt="DayBar" height="52" width="52" src="https://github.com/user-attachments/assets/771b608d-594c-492d-8532-d9231e383f5b"></a>
|
|
14
|
+
<a target="_blank" href="https://apps.apple.com/app/6739444407" title="Iconed for macOS"><img align="center" alt="Iconed" height="52" width="52" src="https://github.com/user-attachments/assets/8a35dc7b-4faf-4e2a-9311-f66d6844a896"></a>
|
|
15
|
+
<a target="_blank" href="https://apps.apple.com/app/6737160756" title="RightMenu Master for macOS"><img align="center" alt="RightMenu Master" height="52" width="52" src="https://github.com/user-attachments/assets/39a76541-71bf-4de7-a01c-c62f0557dff5"></a>
|
|
16
|
+
<a target="_blank" href="https://apps.apple.com/app/6723903021" title="Paste Quick for macOS"><img align="center" alt="Quick RSS" height="52" width="52" src="https://github.com/user-attachments/assets/bdaad5b7-9810-44ce-8f17-8410864465d2"></a>
|
|
17
|
+
<a target="_blank" href="https://apps.apple.com/app/6670696072" title="Quick RSS for macOS/iOS"><img align="center" alt="Quick RSS" height="52" width="52" src="https://github.com/user-attachments/assets/374106b5-a448-4d1d-9ccb-b04b6bc681ed"></a>
|
|
18
|
+
<a target="_blank" href="https://apps.apple.com/app/6670167443" title="Web Serve for macOS"><img align="center" alt="Web Serve" height="52" width="52" src="https://github.com/user-attachments/assets/e1d9f76f-0f3d-4ba5-8a15-253ee173bb1c"></a>
|
|
19
|
+
<a target="_blank" href="https://apps.apple.com/app/6503953628" title="Copybook Generator for macOS/iOS"><img align="center" alt="Copybook Generator" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/b90e42ff-158b-4534-82ca-5898fd0e8d73"></a>
|
|
20
|
+
<a target="_blank" href="https://apps.apple.com/app/6471227008" title="DevTutor for macOS/iOS"><img align="center" alt="DevTutor for SwiftUI" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/f15c154d-0192-48eb-8e0e-9e245ffd974a"></a>
|
|
21
|
+
<a target="_blank" href="https://apps.apple.com/app/6479819388" title="RegexMate for macOS/iOS"><img align="center" alt="RegexMate" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/aabe5aa9-9a96-4390-8bed-c3e4023d0dea"></a>
|
|
22
|
+
<a target="_blank" href="https://apps.apple.com/app/6479194014" title="Time Passage for macOS/iOS"><img align="center" alt="Time Passage" height="52" width="52" src="https://github.com/jaywcjlove/time-passage/assets/1680273/6f30e429-e6f3-4dbe-9921-a5effe2a05e9"></a>
|
|
23
|
+
<a target="_blank" href="https://apps.apple.com/app/6478772538" title="IconizeFolder for macOS"><img align="center" alt="Iconize Folder" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/fa9d8b9c-1e51-4ded-877c-fa5b21c47220"></a>
|
|
24
|
+
<a target="_blank" href="https://apps.apple.com/app/6478511402" title="Textsound Saver for macOS/iOS"><img align="center" alt="Textsound Saver" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/0595e842-980b-4574-8891-a8ba853a08be"></a>
|
|
25
|
+
<a target="_blank" href="https://apps.apple.com/app/6476924627" title="Create Custom Symbols for macOS"><img align="center" alt="Create Custom Symbols" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/8cd022ce-a3f1-4e89-b7c6-6fbd0d4db77c"></a>
|
|
26
|
+
<a target="_blank" href="https://apps.apple.com/app/6476452351" title="DevHub for macOS"><img align="center" alt="DevHub" height="52" width="52" src="https://github.com/user-attachments/assets/4a44a4fd-67ce-430b-af0a-72f18feaa47d"></a>
|
|
27
|
+
<a target="_blank" href="https://apps.apple.com/app/6476400184" title="Resume Revise for macOS"><img align="center" alt="Resume Revise" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c9954a20-1905-48de-bdf8-d71837974aa2"></a>
|
|
28
|
+
<a target="_blank" href="https://apps.apple.com/app/6472593276" title="Palette Genius for macOS"><img align="center" alt="Palette Genius" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/27340413-d355-45b2-8f6f-6ac37682d957"></a>
|
|
29
|
+
<a target="_blank" href="https://apps.apple.com/app/6470879005" title="Symbol Scribe for macOS"><img align="center" alt="Symbol Scribe" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c7249f05-fa70-4def-a1e9-571d5f171fc9"></a>
|
|
30
|
+
<br><br>
|
|
31
|
+
</div>
|
|
32
|
+
<hr>
|
|
33
|
+
|
|
34
|
+
|
|
1
35
|
<!--rehype:ignore:start-->
|
|
2
36
|
<p align="center">
|
|
3
37
|
<a href="https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-md-editor/file/README.md">
|
|
@@ -1053,7 +1087,8 @@ As always, thanks to our amazing contributors!
|
|
|
1053
1087
|
<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>
|
|
1054
1088
|
<a href="https://github.com/juspky" title="juspky"><img src="https://avatars.githubusercontent.com/u/11074890?v=4" width="42;" alt="juspky"/></a>
|
|
1055
1089
|
<a href="https://github.com/ryicoh" title="ryicoh"><img src="https://avatars.githubusercontent.com/u/37844673?v=4" width="42;" alt="ryicoh"/></a>
|
|
1056
|
-
<a href="https://github.com/wj0990" title="wangjie"><img src="https://avatars.githubusercontent.com/u/8792016?v=4" width="42;" alt="wangjie"/></a
|
|
1090
|
+
<a href="https://github.com/wj0990" title="wangjie"><img src="https://avatars.githubusercontent.com/u/8792016?v=4" width="42;" alt="wangjie"/></a>
|
|
1091
|
+
<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-->
|
|
1057
1092
|
|
|
1058
1093
|
Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
|
|
1059
1094
|
|
package/commands.d.ts
CHANGED
|
@@ -14,13 +14,13 @@ declare module '@uiw/react-md-editor/commands' {
|
|
|
14
14
|
import { codeEdit, codeLive, codePreview } from '@uiw/react-md-editor/esm/commands/preview';
|
|
15
15
|
import { quote } from '@uiw/react-md-editor/esm/commands/quote';
|
|
16
16
|
import { strikethrough } from '@uiw/react-md-editor/esm/commands/strikeThrough';
|
|
17
|
-
import { title } from '@uiw/react-md-editor/esm/commands/title';
|
|
18
|
-
import { title1 } from '@uiw/react-md-editor/esm/commands/title1';
|
|
19
|
-
import { title2 } from '@uiw/react-md-editor/esm/commands/title2';
|
|
20
|
-
import { title3 } from '@uiw/react-md-editor/esm/commands/title3';
|
|
21
|
-
import { title4 } from '@uiw/react-md-editor/esm/commands/title4';
|
|
22
|
-
import { title5 } from '@uiw/react-md-editor/esm/commands/title5';
|
|
23
|
-
import { title6 } from '@uiw/react-md-editor/esm/commands/title6';
|
|
17
|
+
import { title, heading } from '@uiw/react-md-editor/esm/commands/title';
|
|
18
|
+
import { title1, heading1 } from '@uiw/react-md-editor/esm/commands/title1';
|
|
19
|
+
import { title2, heading2 } from '@uiw/react-md-editor/esm/commands/title2';
|
|
20
|
+
import { title3, heading3 } from '@uiw/react-md-editor/esm/commands/title3';
|
|
21
|
+
import { title4, heading4 } from '@uiw/react-md-editor/esm/commands/title4';
|
|
22
|
+
import { title5, heading5 } from '@uiw/react-md-editor/esm/commands/title5';
|
|
23
|
+
import { title6, heading6 } from '@uiw/react-md-editor/esm/commands/title6';
|
|
24
24
|
import { table } from '@uiw/react-md-editor/esm/commands/table';
|
|
25
25
|
import { issue } from '@uiw/react-md-editor/esm/commands/issue';
|
|
26
26
|
import { help } from '@uiw/react-md-editor/esm/commands/help';
|
|
@@ -117,6 +117,13 @@ declare module '@uiw/react-md-editor/commands' {
|
|
|
117
117
|
title4,
|
|
118
118
|
title5,
|
|
119
119
|
title6,
|
|
120
|
+
heading,
|
|
121
|
+
heading1,
|
|
122
|
+
heading2,
|
|
123
|
+
heading3,
|
|
124
|
+
heading4,
|
|
125
|
+
heading5,
|
|
126
|
+
heading6,
|
|
120
127
|
bold,
|
|
121
128
|
codeBlock,
|
|
122
129
|
comment,
|
package/dist/mdeditor.js
CHANGED
|
@@ -820,6 +820,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
820
820
|
getStateFromTextArea: () => (/* reexport */ getStateFromTextArea),
|
|
821
821
|
getSurroundingWord: () => (/* reexport */ getSurroundingWord),
|
|
822
822
|
group: () => (/* reexport */ group),
|
|
823
|
+
heading: () => (/* reexport */ title_heading),
|
|
824
|
+
heading1: () => (/* reexport */ heading1),
|
|
825
|
+
heading2: () => (/* reexport */ heading2),
|
|
826
|
+
heading3: () => (/* reexport */ heading3),
|
|
827
|
+
heading4: () => (/* reexport */ heading4),
|
|
828
|
+
heading5: () => (/* reexport */ heading5),
|
|
829
|
+
heading6: () => (/* reexport */ heading6),
|
|
830
|
+
headingExecute: () => (/* reexport */ headingExecute),
|
|
823
831
|
help: () => (/* reexport */ help),
|
|
824
832
|
hr: () => (/* reexport */ hr),
|
|
825
833
|
image: () => (/* reexport */ commands_image_image),
|
|
@@ -932,6 +940,13 @@ __webpack_require__.d(commands_namespaceObject, {
|
|
|
932
940
|
getExtraCommands: () => (getExtraCommands),
|
|
933
941
|
getStateFromTextArea: () => (getStateFromTextArea),
|
|
934
942
|
group: () => (group),
|
|
943
|
+
heading: () => (title_heading),
|
|
944
|
+
heading1: () => (heading1),
|
|
945
|
+
heading2: () => (heading2),
|
|
946
|
+
heading3: () => (heading3),
|
|
947
|
+
heading4: () => (heading4),
|
|
948
|
+
heading5: () => (heading5),
|
|
949
|
+
heading6: () => (heading6),
|
|
935
950
|
help: () => (help),
|
|
936
951
|
hr: () => (hr),
|
|
937
952
|
image: () => (commands_image_image),
|
|
@@ -8879,7 +8894,7 @@ function isAlphanumerical(character) {
|
|
|
8879
8894
|
;// ../node_modules/decode-named-character-reference/index.dom.js
|
|
8880
8895
|
/// <reference lib="dom" />
|
|
8881
8896
|
|
|
8882
|
-
/*
|
|
8897
|
+
/* global document */
|
|
8883
8898
|
|
|
8884
8899
|
const index_dom_element = document.createElement('i')
|
|
8885
8900
|
|
|
@@ -33588,8 +33603,7 @@ var selectors4SyntaxDefinition = extendSyntaxDefinition(selectors3SyntaxDefiniti
|
|
|
33588
33603
|
},
|
|
33589
33604
|
pseudoElements: {
|
|
33590
33605
|
definitions: {
|
|
33591
|
-
NoArgument: ['marker']
|
|
33592
|
-
Selector: ['part']
|
|
33606
|
+
NoArgument: ['marker']
|
|
33593
33607
|
}
|
|
33594
33608
|
}
|
|
33595
33609
|
});
|
|
@@ -33674,7 +33688,7 @@ var cssModules = {
|
|
|
33674
33688
|
latest: true,
|
|
33675
33689
|
pseudoElements: {
|
|
33676
33690
|
definitions: {
|
|
33677
|
-
|
|
33691
|
+
String: ['part']
|
|
33678
33692
|
}
|
|
33679
33693
|
}
|
|
33680
33694
|
}
|
|
@@ -80082,19 +80096,47 @@ var quote={name:'quote',keyCommand:'quote',shortcuts:'ctrlcmd+q',prefix:'> ',but
|
|
|
80082
80096
|
;// ./src/commands/strikeThrough.tsx
|
|
80083
80097
|
var strikeThrough_strikethrough={name:'strikethrough',keyCommand:'strikethrough',shortcuts:'ctrl+shift+x',buttonProps:{'aria-label':'Add strikethrough text (ctrl + shift + x)',title:'Add strikethrough text (ctrl + shift + x)'},prefix:'~~',icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:state.command.prefix});}};
|
|
80084
80098
|
;// ./src/commands/title1.tsx
|
|
80085
|
-
var
|
|
80099
|
+
var heading1={name:'heading1',keyCommand:'heading1',shortcuts:'ctrlcmd+1',prefix:'# ',suffix:'',buttonProps:{'aria-label':'Insert Heading 1 (ctrl + 1)',title:'Insert Heading 1 (ctrl + 1)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:18,textAlign:'left'},children:"Heading 1"}),execute:function execute(state,api){headingExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};/**
|
|
80100
|
+
* @deprecated Use `heading1` instead.
|
|
80101
|
+
* This command is now deprecated and will be removed in future versions.
|
|
80102
|
+
* Use `title1` for inserting Heading 1.
|
|
80103
|
+
*/var title1=heading1;
|
|
80086
80104
|
;// ./src/commands/title.tsx
|
|
80087
|
-
function
|
|
80105
|
+
function headingExecute(_ref){var state=_ref.state,api=_ref.api,prefix=_ref.prefix,_ref$suffix=_ref.suffix,suffix=_ref$suffix===void 0?prefix:_ref$suffix;var newSelectionRange=selectLine({text:state.text,selection:state.selection});var state1=api.setSelectionRange(newSelectionRange);executeCommand({api:api,selectedText:state1.selectedText,selection:state.selection,prefix:prefix,suffix:suffix});}var title_heading=_objectSpread2(_objectSpread2({},heading1),{},{icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})})});/**
|
|
80106
|
+
* @deprecated Use `heading` instead.
|
|
80107
|
+
* This command is now deprecated and will be removed in future versions.
|
|
80108
|
+
* Use `title` for inserting headings.
|
|
80109
|
+
*/var title=title_heading;
|
|
80088
80110
|
;// ./src/commands/title2.tsx
|
|
80089
|
-
var
|
|
80111
|
+
var heading2={name:'heading2',keyCommand:'heading2',shortcuts:'ctrlcmd+2',prefix:'## ',suffix:'',buttonProps:{'aria-label':'Insert Heading 2 (ctrl + 2)',title:'Insert Heading 2 (ctrl + 2)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:16,textAlign:'left'},children:"Heading 2"}),execute:function execute(state,api){headingExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};/**
|
|
80112
|
+
* @deprecated Use `heading2` instead.
|
|
80113
|
+
* This command is now deprecated and will be removed in future versions.
|
|
80114
|
+
* Use `title2` for inserting Heading 2.
|
|
80115
|
+
*/var title2=heading2;
|
|
80090
80116
|
;// ./src/commands/title3.tsx
|
|
80091
|
-
var
|
|
80117
|
+
var heading3={name:'heading3',keyCommand:'heading3',shortcuts:'ctrlcmd+3',prefix:'### ',suffix:'',buttonProps:{'aria-label':'Insert Heading 3 (ctrl + 3)',title:'Insert Heading 3 (ctrl + 3)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:15,textAlign:'left'},children:"Heading 3"}),execute:function execute(state,api){headingExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};/**
|
|
80118
|
+
* @deprecated Use `heading3` instead.
|
|
80119
|
+
* This command is now deprecated and will be removed in future versions.
|
|
80120
|
+
* Use `title3` for inserting Heading 3.
|
|
80121
|
+
*/var title3=heading3;
|
|
80092
80122
|
;// ./src/commands/title4.tsx
|
|
80093
|
-
var
|
|
80123
|
+
var heading4={name:'heading4',keyCommand:'heading4',shortcuts:'ctrlcmd+4',prefix:'#### ',suffix:'',buttonProps:{'aria-label':'Insert Heading 4 (ctrl + 4)',title:'Insert Heading 4 (ctrl + 4)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:14,textAlign:'left'},children:"Heading 4"}),execute:function execute(state,api){headingExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};/**
|
|
80124
|
+
* @deprecated Use `heading4` instead.
|
|
80125
|
+
* This command is now deprecated and will be removed in future versions.
|
|
80126
|
+
* Use `title4` for inserting Heading 4.
|
|
80127
|
+
*/var title4=heading4;
|
|
80094
80128
|
;// ./src/commands/title5.tsx
|
|
80095
|
-
var
|
|
80129
|
+
var heading5={name:'heading5',keyCommand:'heading5',shortcuts:'ctrlcmd+5',prefix:'##### ',suffix:'',buttonProps:{'aria-label':'Insert Heading 5 (ctrl + 5)',title:'Insert Heading 5 (ctrl + 5)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:12,textAlign:'left'},children:"Heading 5"}),execute:function execute(state,api){headingExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};/**
|
|
80130
|
+
* @deprecated Use `heading5` instead.
|
|
80131
|
+
* This command is now deprecated and will be removed in future versions.
|
|
80132
|
+
* Use `title5` for inserting Heading 5.
|
|
80133
|
+
*/var title5=heading5;
|
|
80096
80134
|
;// ./src/commands/title6.tsx
|
|
80097
|
-
var
|
|
80135
|
+
var heading6={name:'heading6',keyCommand:'heading6',shortcuts:'ctrlcmd+6',prefix:'###### ',suffix:'',buttonProps:{'aria-label':'Insert Heading 6 (ctrl + 6)',title:'Insert Heading 6 (ctrl + 6)'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{style:{fontSize:12,textAlign:'left'},children:"Heading 6"}),execute:function execute(state,api){headingExecute({state:state,api:api,prefix:state.command.prefix,suffix:state.command.suffix});}};/**
|
|
80136
|
+
* @deprecated Use `heading6` instead.
|
|
80137
|
+
* This command is now deprecated and will be removed in future versions.
|
|
80138
|
+
* Use `title6` for inserting Heading 6.
|
|
80139
|
+
*/var title6=heading6;
|
|
80098
80140
|
;// ./src/commands/table.tsx
|
|
80099
80141
|
var table_table={name:'table',keyCommand:'table',prefix:'\n| Header | Header |\n|--------|--------|\n| Cell | Cell |\n| Cell | Cell |\n| Cell | Cell |\n\n',suffix:'',buttonProps:{'aria-label':'Add table',title:'Add table'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"//Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
|
|
80100
80142
|
})}),execute:function execute(state,api){var newSelectionRange=selectWord({text:state.text,selection:state.selection,prefix:state.command.prefix,suffix:state.command.suffix});var state1=api.setSelectionRange(newSelectionRange);if(state1.selectedText.length>=state.command.prefix.length+state.command.suffix.length&&state1.selectedText.startsWith(state.command.prefix)){// Remove
|