@uiw/react-md-editor 3.9.9 → 3.10.0
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 +46 -21
- package/dist/mdeditor.css +0 -2
- package/dist/mdeditor.js +34 -39
- package/dist/mdeditor.min.css +1 -1
- package/dist/mdeditor.min.js +1 -1
- package/esm/Editor.d.ts +4 -0
- package/esm/Editor.js +4 -2
- package/esm/Editor.js.map +3 -2
- package/esm/components/Toolbar/index.d.ts +1 -0
- package/esm/components/Toolbar/index.js +5 -3
- package/esm/components/Toolbar/index.js.map +3 -3
- package/lib/Editor.d.ts +4 -0
- package/lib/Editor.js +5 -2
- package/lib/Editor.js.map +3 -2
- package/lib/components/Toolbar/index.d.ts +1 -0
- package/lib/components/Toolbar/index.js +5 -3
- package/lib/components/Toolbar/index.js.map +3 -3
- package/package.json +2 -2
- package/src/Editor.tsx +6 -1
- package/src/components/Toolbar/index.tsx +5 -3
package/README.md
CHANGED
|
@@ -310,14 +310,14 @@ export default function App() {
|
|
|
310
310
|
|
|
311
311
|
Using [mermaid](https://github.com/mermaid-js/mermaid) to generation of diagram and flowchart from text in a similar manner as markdown
|
|
312
312
|
|
|
313
|
-
[](https://codesandbox.io/embed/
|
|
313
|
+
[](https://codesandbox.io/embed/recursing-water-08i59s?fontsize=14&hidenavigation=1&theme=dark)
|
|
314
314
|
|
|
315
315
|
```bash
|
|
316
316
|
npm install mermaid
|
|
317
317
|
```
|
|
318
318
|
|
|
319
319
|
```jsx
|
|
320
|
-
import React from "react";
|
|
320
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
321
321
|
import ReactDOM from "react-dom";
|
|
322
322
|
import MDEditor from "@uiw/react-md-editor";
|
|
323
323
|
import mermaid from "mermaid";
|
|
@@ -345,37 +345,61 @@ Bob-->>John: Jolly good!
|
|
|
345
345
|
\`\`\`
|
|
346
346
|
`;
|
|
347
347
|
|
|
348
|
-
const
|
|
349
|
-
|
|
348
|
+
const randomid = () => parseInt(String(Math.random() * 1e15), 10).toString(36);
|
|
349
|
+
const Code = ({ inline, children = [], className, ...props }: any) => {
|
|
350
|
+
const demoid = useRef(`dome${randomid()}`);
|
|
351
|
+
const code = getCode(children);
|
|
352
|
+
const demo = useRef(null);
|
|
353
|
+
useEffect(() => {
|
|
354
|
+
if (demo.current) {
|
|
355
|
+
try {
|
|
356
|
+
const str = mermaid.render(demoid.current, code, () => null, demo.current);
|
|
357
|
+
// @ts-ignore
|
|
358
|
+
demo.current.innerHTML = str;
|
|
359
|
+
} catch (error) {
|
|
360
|
+
// @ts-ignore
|
|
361
|
+
demo.current.innerHTML = error;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}, [code, demo]);
|
|
365
|
+
|
|
366
|
+
if (
|
|
367
|
+
typeof code === "string" && typeof className === "string" &&
|
|
368
|
+
/^language-mermaid/.test(className.toLocaleLowerCase())
|
|
369
|
+
) {
|
|
370
|
+
return (
|
|
371
|
+
<code ref={demo}>
|
|
372
|
+
<code id={demoid.current} style={{ display: "none" }} />
|
|
373
|
+
</code>
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
return <code className={String(className)}>{children}</code>;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
const getCode = (arr = []) => arr.map((dt) => {
|
|
380
|
+
if (typeof dt === "string") {
|
|
350
381
|
return dt;
|
|
351
382
|
}
|
|
352
383
|
if (dt.props && dt.props.children) {
|
|
353
384
|
return getCode(dt.props.children);
|
|
354
385
|
}
|
|
355
|
-
|
|
386
|
+
return false;
|
|
387
|
+
}).filter(Boolean).join("");
|
|
356
388
|
|
|
357
389
|
export default function App() {
|
|
390
|
+
const [value, setValue] = useState(mdMermaid);
|
|
358
391
|
return (
|
|
359
392
|
<MDEditor
|
|
393
|
+
onChange={(newValue = "") => setValue(newValue)}
|
|
394
|
+
textareaProps={{
|
|
395
|
+
placeholder: "Please enter Markdown text"
|
|
396
|
+
}}
|
|
360
397
|
height={500}
|
|
361
|
-
value={
|
|
398
|
+
value={value}
|
|
362
399
|
previewOptions={{
|
|
363
400
|
components: {
|
|
364
|
-
code:
|
|
365
|
-
|
|
366
|
-
if (
|
|
367
|
-
typeof code === 'string' &&
|
|
368
|
-
typeof className === 'string' &&
|
|
369
|
-
/^language-mermaid/.test(className.toLocaleLowerCase())
|
|
370
|
-
) {
|
|
371
|
-
const Elm = document.createElement("div");
|
|
372
|
-
Elm.id = "demo";
|
|
373
|
-
const svg = mermaid.render("demo", code);
|
|
374
|
-
return <code dangerouslySetInnerHTML={{ __html: svg }} />
|
|
375
|
-
}
|
|
376
|
-
return <code className={String(className)}>{children}</code>;
|
|
377
|
-
},
|
|
378
|
-
},
|
|
401
|
+
code: Code
|
|
402
|
+
}
|
|
379
403
|
}}
|
|
380
404
|
/>
|
|
381
405
|
);
|
|
@@ -439,6 +463,7 @@ export default HomePage;
|
|
|
439
463
|
- `visiableDragbar?: boolean=true`: Show drag and drop tool. Set the height of the editor.
|
|
440
464
|
- `highlightEnable?: boolean=true`: Disable editing area code highlighting. The value is `false`, which increases the editing speed.
|
|
441
465
|
- `fullscreen?: boolean=false`: Show markdown preview.
|
|
466
|
+
- `overflow?: boolean=true`: Disable `fullscreen` setting body styles
|
|
442
467
|
- `preview?: 'live' | 'edit' | 'preview'`: Default value `live`, Show markdown preview.
|
|
443
468
|
- `maxHeight?: number=1200`: Maximum drag height. The `visiableDragbar=true` value is valid.
|
|
444
469
|
- `minHeights?: number=100`: Minimum drag height. The `visiableDragbar=true` value is valid.
|
package/dist/mdeditor.css
CHANGED
package/dist/mdeditor.js
CHANGED
|
@@ -38149,19 +38149,18 @@ function _extends() {
|
|
|
38149
38149
|
// EXTERNAL MODULE: ./node_modules/is-buffer/index.js
|
|
38150
38150
|
var is_buffer = __webpack_require__(1433);
|
|
38151
38151
|
;// CONCATENATED MODULE: ./node_modules/unist-util-stringify-position/index.js
|
|
38152
|
-
var own = {}.hasOwnProperty
|
|
38153
|
-
|
|
38154
38152
|
/**
|
|
38153
|
+
* @typedef {import('unist').Point} Point
|
|
38155
38154
|
* @typedef {import('unist').Node} Node
|
|
38156
38155
|
* @typedef {import('unist').Position} Position
|
|
38157
|
-
* @typedef {
|
|
38156
|
+
* @typedef {object & {type: string, position?: Position|undefined}} NodeLike
|
|
38158
38157
|
*/
|
|
38159
38158
|
|
|
38160
38159
|
/**
|
|
38161
38160
|
* Stringify one point, a position (start and end points), or a node’s
|
|
38162
38161
|
* positional information.
|
|
38163
38162
|
*
|
|
38164
|
-
* @param {Node|Position|Point} [value]
|
|
38163
|
+
* @param {Node|NodeLike|Position|Point|null} [value]
|
|
38165
38164
|
* @returns {string}
|
|
38166
38165
|
*/
|
|
38167
38166
|
function stringifyPosition(value) {
|
|
@@ -38171,20 +38170,17 @@ function stringifyPosition(value) {
|
|
|
38171
38170
|
}
|
|
38172
38171
|
|
|
38173
38172
|
// Node.
|
|
38174
|
-
if (
|
|
38175
|
-
// @ts-ignore looks like a node.
|
|
38173
|
+
if ('position' in value || 'type' in value) {
|
|
38176
38174
|
return position(value.position)
|
|
38177
38175
|
}
|
|
38178
38176
|
|
|
38179
38177
|
// Position.
|
|
38180
|
-
if (
|
|
38181
|
-
// @ts-ignore looks like a position.
|
|
38178
|
+
if ('start' in value || 'end' in value) {
|
|
38182
38179
|
return position(value)
|
|
38183
38180
|
}
|
|
38184
38181
|
|
|
38185
38182
|
// Point.
|
|
38186
|
-
if (
|
|
38187
|
-
// @ts-ignore looks like a point.
|
|
38183
|
+
if ('line' in value || 'column' in value) {
|
|
38188
38184
|
return point(value)
|
|
38189
38185
|
}
|
|
38190
38186
|
|
|
@@ -38193,7 +38189,7 @@ function stringifyPosition(value) {
|
|
|
38193
38189
|
}
|
|
38194
38190
|
|
|
38195
38191
|
/**
|
|
38196
|
-
* @param {Point} point
|
|
38192
|
+
* @param {Point|undefined} point
|
|
38197
38193
|
* @returns {string}
|
|
38198
38194
|
*/
|
|
38199
38195
|
function point(point) {
|
|
@@ -38201,7 +38197,7 @@ function point(point) {
|
|
|
38201
38197
|
}
|
|
38202
38198
|
|
|
38203
38199
|
/**
|
|
38204
|
-
* @param {Position} pos
|
|
38200
|
+
* @param {Position|undefined} pos
|
|
38205
38201
|
* @returns {string}
|
|
38206
38202
|
*/
|
|
38207
38203
|
function position(pos) {
|
|
@@ -38209,7 +38205,7 @@ function position(pos) {
|
|
|
38209
38205
|
}
|
|
38210
38206
|
|
|
38211
38207
|
/**
|
|
38212
|
-
* @param {number} value
|
|
38208
|
+
* @param {number|undefined} value
|
|
38213
38209
|
* @returns {number}
|
|
38214
38210
|
*/
|
|
38215
38211
|
function index(value) {
|
|
@@ -38221,6 +38217,7 @@ function index(value) {
|
|
|
38221
38217
|
* @typedef {import('unist').Node} Node
|
|
38222
38218
|
* @typedef {import('unist').Position} Position
|
|
38223
38219
|
* @typedef {import('unist').Point} Point
|
|
38220
|
+
* @typedef {object & {type: string, position?: Position|undefined}} NodeLike
|
|
38224
38221
|
*/
|
|
38225
38222
|
|
|
38226
38223
|
|
|
@@ -38231,29 +38228,29 @@ class VFileMessage extends Error {
|
|
|
38231
38228
|
* When an error is passed in as `reason`, copies the `stack`.
|
|
38232
38229
|
*
|
|
38233
38230
|
* @param {string|Error} reason Reason for message (`string` or `Error`). Uses the stack and message of the error if given.
|
|
38234
|
-
* @param {Node|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
|
38231
|
+
* @param {Node|NodeLike|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
|
38235
38232
|
* @param {string} [origin] Place in code the message originates from (`string`, optional).
|
|
38236
38233
|
*/
|
|
38237
38234
|
constructor(reason, place, origin) {
|
|
38238
|
-
/** @type {[string
|
|
38239
|
-
|
|
38235
|
+
/** @type {[string|null, string|null]} */
|
|
38236
|
+
const parts = [null, null]
|
|
38240
38237
|
/** @type {Position} */
|
|
38241
|
-
|
|
38238
|
+
let position = {
|
|
38239
|
+
// @ts-expect-error: we always follows the structure of `position`.
|
|
38242
38240
|
start: {line: null, column: null},
|
|
38241
|
+
// @ts-expect-error: "
|
|
38243
38242
|
end: {line: null, column: null}
|
|
38244
38243
|
}
|
|
38245
|
-
/** @type {number} */
|
|
38246
|
-
var index
|
|
38247
38244
|
|
|
38248
38245
|
super()
|
|
38249
38246
|
|
|
38250
38247
|
if (typeof place === 'string') {
|
|
38251
38248
|
origin = place
|
|
38252
|
-
place =
|
|
38249
|
+
place = undefined
|
|
38253
38250
|
}
|
|
38254
38251
|
|
|
38255
38252
|
if (typeof origin === 'string') {
|
|
38256
|
-
index = origin.indexOf(':')
|
|
38253
|
+
const index = origin.indexOf(':')
|
|
38257
38254
|
|
|
38258
38255
|
if (index === -1) {
|
|
38259
38256
|
parts[1] = origin
|
|
@@ -38272,12 +38269,10 @@ class VFileMessage extends Error {
|
|
|
38272
38269
|
}
|
|
38273
38270
|
// Position.
|
|
38274
38271
|
else if ('start' in place || 'end' in place) {
|
|
38275
|
-
// @ts-ignore Looks like a position.
|
|
38276
38272
|
position = place
|
|
38277
38273
|
}
|
|
38278
38274
|
// Point.
|
|
38279
38275
|
else if ('line' in place || 'column' in place) {
|
|
38280
|
-
// @ts-ignore Looks like a point.
|
|
38281
38276
|
position.start = place
|
|
38282
38277
|
}
|
|
38283
38278
|
}
|
|
@@ -38891,6 +38886,7 @@ function getPathFromURLPosix(url) {
|
|
|
38891
38886
|
* @typedef {import('unist').Node} Node
|
|
38892
38887
|
* @typedef {import('unist').Position} Position
|
|
38893
38888
|
* @typedef {import('unist').Point} Point
|
|
38889
|
+
* @typedef {Record<string, unknown> & {type: string, position?: Position|undefined}} NodeLike
|
|
38894
38890
|
* @typedef {import('./minurl.shared.js').URL} URL
|
|
38895
38891
|
* @typedef {import('..').VFileData} VFileData
|
|
38896
38892
|
* @typedef {import('..').VFileValue} VFileValue
|
|
@@ -38901,7 +38897,6 @@ function getPathFromURLPosix(url) {
|
|
|
38901
38897
|
* being needed.
|
|
38902
38898
|
* Copied from: <https://github.com/DefinitelyTyped/DefinitelyTyped/blob/90a4ec8/types/node/buffer.d.ts#L170>
|
|
38903
38899
|
*
|
|
38904
|
-
*
|
|
38905
38900
|
* @typedef {VFileValue|VFileOptions|VFile|URL} VFileCompatible
|
|
38906
38901
|
* Things that can be passed to the constructor.
|
|
38907
38902
|
*
|
|
@@ -39187,7 +39182,7 @@ class VFile {
|
|
|
39187
39182
|
* Create a message and associates it w/ the file.
|
|
39188
39183
|
*
|
|
39189
39184
|
* @param {string|Error} reason Reason for message (`string` or `Error`). Uses the stack and message of the error if given.
|
|
39190
|
-
* @param {Node|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
|
39185
|
+
* @param {Node|NodeLike|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
|
39191
39186
|
* @param {string} [origin] Place in code the message originates from (`string`, optional).
|
|
39192
39187
|
* @returns {VFileMessage}
|
|
39193
39188
|
*/
|
|
@@ -39212,7 +39207,7 @@ class VFile {
|
|
|
39212
39207
|
* Calls `message()` internally.
|
|
39213
39208
|
*
|
|
39214
39209
|
* @param {string|Error} reason Reason for message (`string` or `Error`). Uses the stack and message of the error if given.
|
|
39215
|
-
* @param {Node|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
|
39210
|
+
* @param {Node|NodeLike|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
|
39216
39211
|
* @param {string} [origin] Place in code the message originates from (`string`, optional).
|
|
39217
39212
|
* @returns {VFileMessage}
|
|
39218
39213
|
*/
|
|
@@ -39231,7 +39226,7 @@ class VFile {
|
|
|
39231
39226
|
* Calls `message()` internally.
|
|
39232
39227
|
*
|
|
39233
39228
|
* @param {string|Error} reason Reason for message (`string` or `Error`). Uses the stack and message of the error if given.
|
|
39234
|
-
* @param {Node|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
|
39229
|
+
* @param {Node|NodeLike|Position|Point} [place] Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
|
39235
39230
|
* @param {string} [origin] Place in code the message originates from (`string`, optional).
|
|
39236
39231
|
* @returns {never}
|
|
39237
39232
|
*/
|
|
@@ -39504,7 +39499,7 @@ function wrap(middleware, callback) {
|
|
|
39504
39499
|
// Expose a frozen processor.
|
|
39505
39500
|
const unified = base().freeze()
|
|
39506
39501
|
|
|
39507
|
-
const
|
|
39502
|
+
const own = {}.hasOwnProperty
|
|
39508
39503
|
|
|
39509
39504
|
// Function to create the first processor.
|
|
39510
39505
|
/**
|
|
@@ -39577,7 +39572,7 @@ function base() {
|
|
|
39577
39572
|
}
|
|
39578
39573
|
|
|
39579
39574
|
// Get `key`.
|
|
39580
|
-
return (
|
|
39575
|
+
return (own.call(namespace, key) && namespace[key]) || null
|
|
39581
39576
|
}
|
|
39582
39577
|
|
|
39583
39578
|
// Set space.
|
|
@@ -39605,7 +39600,7 @@ function base() {
|
|
|
39605
39600
|
}
|
|
39606
39601
|
|
|
39607
39602
|
if (options[0] === true) {
|
|
39608
|
-
options[
|
|
39603
|
+
options[0] = undefined
|
|
39609
39604
|
}
|
|
39610
39605
|
|
|
39611
39606
|
/** @type {Transformer|void} */
|
|
@@ -39963,7 +39958,7 @@ function keys(value) {
|
|
|
39963
39958
|
let key
|
|
39964
39959
|
|
|
39965
39960
|
for (key in value) {
|
|
39966
|
-
if (
|
|
39961
|
+
if (own.call(value, key)) {
|
|
39967
39962
|
return true
|
|
39968
39963
|
}
|
|
39969
39964
|
}
|
|
@@ -46814,7 +46809,7 @@ function decode($0, $1, $2) {
|
|
|
46814
46809
|
|
|
46815
46810
|
|
|
46816
46811
|
|
|
46817
|
-
const
|
|
46812
|
+
const lib_own = {}.hasOwnProperty
|
|
46818
46813
|
/**
|
|
46819
46814
|
* @param value Markdown to parse (`string` or `Buffer`).
|
|
46820
46815
|
* @param [encoding] Character encoding to understand `value` as when it’s a `Buffer` (`string`, default: `'utf8'`).
|
|
@@ -47022,7 +47017,7 @@ function compiler(options = {}) {
|
|
|
47022
47017
|
while (++index < events.length) {
|
|
47023
47018
|
const handler = config[events[index][0]]
|
|
47024
47019
|
|
|
47025
|
-
if (
|
|
47020
|
+
if (lib_own.call(handler, events[index][1].type)) {
|
|
47026
47021
|
handler[events[index][1].type].call(
|
|
47027
47022
|
Object.assign(
|
|
47028
47023
|
{
|
|
@@ -47912,9 +47907,9 @@ function extension(combined, extension) {
|
|
|
47912
47907
|
let key
|
|
47913
47908
|
|
|
47914
47909
|
for (key in extension) {
|
|
47915
|
-
if (
|
|
47910
|
+
if (lib_own.call(extension, key)) {
|
|
47916
47911
|
const list = key === 'canContainEols' || key === 'transforms'
|
|
47917
|
-
const maybe =
|
|
47912
|
+
const maybe = lib_own.call(combined, key) ? combined[key] : undefined
|
|
47918
47913
|
/* c8 ignore next */
|
|
47919
47914
|
|
|
47920
47915
|
const left = maybe || (combined[key] = list ? [] : {})
|
|
@@ -75579,10 +75574,10 @@ function Child_Child(props){var _ref=props||{},prefixCls=_ref.prefixCls,groupNam
|
|
|
75579
75574
|
// extracted by mini-css-extract-plugin
|
|
75580
75575
|
/* harmony default export */ const Toolbar = ({});
|
|
75581
75576
|
;// CONCATENATED MODULE: ./src/components/Toolbar/index.tsx
|
|
75582
|
-
function ToolbarItems(props){var prefixCls=props.prefixCls;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),fullscreen=_useContext.fullscreen,preview=_useContext.preview,_useContext$barPopup=_useContext.barPopup,barPopup=_useContext$barPopup===void 0?{}:_useContext$barPopup,commandOrchestrator=_useContext.commandOrchestrator,dispatch=_useContext.dispatch;var originalOverflow=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('');function handleClick(command,name){if(!dispatch)return;var state={barPopup:_objectSpread2({},barPopup)};if(command.keyCommand==='preview'){state.preview=command.value;}if(command.keyCommand==='fullscreen'){state.fullscreen=!fullscreen;}if(props.commands&&command.keyCommand==='group'){props.commands.forEach(function(item){if(name===item.groupName){state.barPopup[name]=true;}else if(item.keyCommand){state.barPopup[item.groupName]=false;}});}else if(name||command.parent){Object.keys(state.barPopup||{}).forEach(function(keyName){state.barPopup[keyName]=false;});}if(Object.keys(state).length){dispatch(_objectSpread2({},state));}commandOrchestrator&&commandOrchestrator.executeCommand(command);}(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){if(document){if(fullscreen){// prevent scroll on fullscreen
|
|
75577
|
+
function ToolbarItems(props){var prefixCls=props.prefixCls,overflow=props.overflow;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),fullscreen=_useContext.fullscreen,preview=_useContext.preview,_useContext$barPopup=_useContext.barPopup,barPopup=_useContext$barPopup===void 0?{}:_useContext$barPopup,commandOrchestrator=_useContext.commandOrchestrator,dispatch=_useContext.dispatch;var originalOverflow=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('');function handleClick(command,name){if(!dispatch)return;var state={barPopup:_objectSpread2({},barPopup)};if(command.keyCommand==='preview'){state.preview=command.value;}if(command.keyCommand==='fullscreen'){state.fullscreen=!fullscreen;}if(props.commands&&command.keyCommand==='group'){props.commands.forEach(function(item){if(name===item.groupName){state.barPopup[name]=true;}else if(item.keyCommand){state.barPopup[item.groupName]=false;}});}else if(name||command.parent){Object.keys(state.barPopup||{}).forEach(function(keyName){state.barPopup[keyName]=false;});}if(Object.keys(state).length){dispatch(_objectSpread2({},state));}commandOrchestrator&&commandOrchestrator.executeCommand(command);}(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){if(document&&overflow){if(fullscreen){// prevent scroll on fullscreen
|
|
75583
75578
|
document.body.style.overflow='hidden';}else{// get the original overflow only the first time
|
|
75584
75579
|
if(!originalOverflow.current){originalOverflow.current=window.getComputedStyle(document.body,null).overflow;}// reset to the original overflow
|
|
75585
|
-
document.body.style.overflow=originalOverflow.current;}}},[fullscreen,originalOverflow]);return/*#__PURE__*/(0,jsx_runtime.jsx)("ul",{children:(props.commands||[]).map(function(item,idx){if(item.keyCommand==='divider'){return/*#__PURE__*/(0,jsx_runtime.jsx)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:"".concat(prefixCls,"-toolbar-divider")}),idx);}if(!item.keyCommand)return/*#__PURE__*/(0,jsx_runtime.jsx)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment,{},idx);var activeBtn=fullscreen&&item.keyCommand==='fullscreen'||item.keyCommand==='preview'&&preview===item.value;var childNode=item.children&&typeof item.children==='function'?item.children({getState:function getState(){return commandOrchestrator.getState();},textApi:commandOrchestrator?commandOrchestrator.textApi:undefined,close:function close(){return handleClick({},item.groupName);},execute:function execute(){return handleClick({execute:item.execute});}}):undefined;var disabled=barPopup&&preview&&preview==='preview'&&!/(preview|fullscreen)/.test(item.keyCommand);return/*#__PURE__*/(0,jsx_runtime.jsxs)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:activeBtn?"active":'',children:[!item.buttonProps&&item.icon,item.buttonProps&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('button',_objectSpread2(_objectSpread2({type:'button',key:idx,disabled:disabled,'data-name':item.name},item.buttonProps),{},{onClick:function onClick(evn){evn.stopPropagation();handleClick(item,item.groupName);}}),item.icon),item.children&&/*#__PURE__*/(0,jsx_runtime.jsx)(Child_Child,{groupName:item.groupName,prefixCls:prefixCls,children:childNode,commands:Array.isArray(item.children)?item.children:undefined})]}),idx);})});}function Toolbar_Toolbar(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var prefixCls=props.prefixCls,_props$height=props.height,height=_props$height===void 0?29:_props$height,isChild=props.isChild;var _useContext2=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),commands=_useContext2.commands,extraCommands=_useContext2.extraCommands;return/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-toolbar"),style:{height:height},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:props.commands||commands||[]})),!isChild&&/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:extraCommands||[]}))]});}
|
|
75580
|
+
document.body.style.overflow=originalOverflow.current;}}},[fullscreen,originalOverflow,overflow]);return/*#__PURE__*/(0,jsx_runtime.jsx)("ul",{children:(props.commands||[]).map(function(item,idx){if(item.keyCommand==='divider'){return/*#__PURE__*/(0,jsx_runtime.jsx)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:"".concat(prefixCls,"-toolbar-divider")}),idx);}if(!item.keyCommand)return/*#__PURE__*/(0,jsx_runtime.jsx)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment,{},idx);var activeBtn=fullscreen&&item.keyCommand==='fullscreen'||item.keyCommand==='preview'&&preview===item.value;var childNode=item.children&&typeof item.children==='function'?item.children({getState:function getState(){return commandOrchestrator.getState();},textApi:commandOrchestrator?commandOrchestrator.textApi:undefined,close:function close(){return handleClick({},item.groupName);},execute:function execute(){return handleClick({execute:item.execute});}}):undefined;var disabled=barPopup&&preview&&preview==='preview'&&!/(preview|fullscreen)/.test(item.keyCommand);return/*#__PURE__*/(0,jsx_runtime.jsxs)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:activeBtn?"active":'',children:[!item.buttonProps&&item.icon,item.buttonProps&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('button',_objectSpread2(_objectSpread2({type:'button',key:idx,disabled:disabled,'data-name':item.name},item.buttonProps),{},{onClick:function onClick(evn){evn.stopPropagation();handleClick(item,item.groupName);}}),item.icon),item.children&&/*#__PURE__*/(0,jsx_runtime.jsx)(Child_Child,{overflow:overflow,groupName:item.groupName,prefixCls:prefixCls,children:childNode,commands:Array.isArray(item.children)?item.children:undefined})]}),idx);})});}function Toolbar_Toolbar(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var prefixCls=props.prefixCls,_props$height=props.height,height=_props$height===void 0?29:_props$height,isChild=props.isChild;var _useContext2=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),commands=_useContext2.commands,extraCommands=_useContext2.extraCommands;return/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-toolbar"),style:{height:height},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:props.commands||commands||[]})),!isChild&&/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:extraCommands||[]}))]});}
|
|
75586
75581
|
;// CONCATENATED MODULE: ./src/components/DragBar/index.less
|
|
75587
75582
|
// extracted by mini-css-extract-plugin
|
|
75588
75583
|
/* harmony default export */ const DragBar = ({});
|
|
@@ -75593,14 +75588,14 @@ var DragBar_DragBar=function DragBar(props){var _ref=props||{},prefixCls=_ref.pr
|
|
|
75593
75588
|
// extracted by mini-css-extract-plugin
|
|
75594
75589
|
/* harmony default export */ const src = ({});
|
|
75595
75590
|
;// CONCATENATED MODULE: ./src/Editor.tsx
|
|
75596
|
-
var Editor_excluded=["prefixCls","className","value","commands","commandsFilter","extraCommands","height","toolbarHeight","enableScroll","visiableDragbar","highlightEnable","preview","fullscreen","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","tabSize","defaultTabEnable","onChange","hideToolbar","renderTextarea"];function setGroupPopFalse(){var data=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.keys(data).forEach(function(keyname){data[keyname]=false;});return data;}var InternalMDEditor=function InternalMDEditor(props,ref){var _ref=props||{},_ref$prefixCls=_ref.prefixCls,prefixCls=_ref$prefixCls===void 0?'w-md-editor':_ref$prefixCls,className=_ref.className,propsValue=_ref.value,_ref$commands=_ref.commands,commands=_ref$commands===void 0?commands_getCommands():_ref$commands,commandsFilter=_ref.commandsFilter,_ref$extraCommands=_ref.extraCommands,extraCommands=_ref$extraCommands===void 0?getExtraCommands():_ref$extraCommands,_ref$height=_ref.height,height=_ref$height===void 0?200:_ref$height,_ref$toolbarHeight=_ref.toolbarHeight,toolbarHeight=_ref$toolbarHeight===void 0?29:_ref$toolbarHeight,_ref$enableScroll=_ref.enableScroll,enableScroll=_ref$enableScroll===void 0?true:_ref$enableScroll,_ref$visiableDragbar=_ref.visiableDragbar,visiableDragbar=_ref$visiableDragbar===void 0?true:_ref$visiableDragbar,_ref$highlightEnable=_ref.highlightEnable,highlightEnable=_ref$highlightEnable===void 0?true:_ref$highlightEnable,_ref$preview=_ref.preview,previewType=_ref$preview===void 0?'live':_ref$preview,_ref$fullscreen=_ref.fullscreen,fullscreen=_ref$fullscreen===void 0?false:_ref$fullscreen,_ref$previewOptions=_ref.previewOptions,previewOptions=_ref$previewOptions===void 0?{}:_ref$previewOptions,textareaProps=_ref.textareaProps,_ref$maxHeight=_ref.maxHeight,maxHeight=_ref$maxHeight===void 0?1200:_ref$maxHeight,_ref$minHeight=_ref.minHeight,minHeight=_ref$minHeight===void 0?100:_ref$minHeight,autoFocus=_ref.autoFocus,_ref$tabSize=_ref.tabSize,tabSize=_ref$tabSize===void 0?2:_ref$tabSize,_ref$defaultTabEnable=_ref.defaultTabEnable,defaultTabEnable=_ref$defaultTabEnable===void 0?false:_ref$defaultTabEnable,_onChange=_ref.onChange,hideToolbar=_ref.hideToolbar,renderTextarea=_ref.renderTextarea,other=_objectWithoutProperties(_ref,Editor_excluded);var cmds=commands.map(function(item){return commandsFilter?commandsFilter(item,false):item;}).filter(Boolean);var extraCmds=extraCommands.map(function(item){return commandsFilter?commandsFilter(item,true):item;}).filter(Boolean);var _useReducer=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(reducer,{markdown:propsValue,preview:previewType,height:height,highlightEnable:highlightEnable,tabSize:tabSize,defaultTabEnable:defaultTabEnable,scrollTop:0,scrollTopPreview:0,commands:cmds,extraCommands:extraCmds,fullscreen:fullscreen,barPopup:{}}),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var container=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var previewRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var enableScrollRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(enableScroll);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref,function(){return _objectSpread2({},state);});(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return enableScrollRef.current=enableScroll;},[enableScroll]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){var stateInit={};if(container.current){stateInit.container=container.current||undefined;}stateInit.markdown=propsValue||'';stateInit.barPopup={};if(dispatch){dispatch(_objectSpread2(_objectSpread2({},state),stateInit));}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75591
|
+
var Editor_excluded=["prefixCls","className","value","commands","commandsFilter","extraCommands","height","toolbarHeight","enableScroll","visiableDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","tabSize","defaultTabEnable","onChange","hideToolbar","renderTextarea"];function setGroupPopFalse(){var data=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.keys(data).forEach(function(keyname){data[keyname]=false;});return data;}var InternalMDEditor=function InternalMDEditor(props,ref){var _ref=props||{},_ref$prefixCls=_ref.prefixCls,prefixCls=_ref$prefixCls===void 0?'w-md-editor':_ref$prefixCls,className=_ref.className,propsValue=_ref.value,_ref$commands=_ref.commands,commands=_ref$commands===void 0?commands_getCommands():_ref$commands,commandsFilter=_ref.commandsFilter,_ref$extraCommands=_ref.extraCommands,extraCommands=_ref$extraCommands===void 0?getExtraCommands():_ref$extraCommands,_ref$height=_ref.height,height=_ref$height===void 0?200:_ref$height,_ref$toolbarHeight=_ref.toolbarHeight,toolbarHeight=_ref$toolbarHeight===void 0?29:_ref$toolbarHeight,_ref$enableScroll=_ref.enableScroll,enableScroll=_ref$enableScroll===void 0?true:_ref$enableScroll,_ref$visiableDragbar=_ref.visiableDragbar,visiableDragbar=_ref$visiableDragbar===void 0?true:_ref$visiableDragbar,_ref$highlightEnable=_ref.highlightEnable,highlightEnable=_ref$highlightEnable===void 0?true:_ref$highlightEnable,_ref$preview=_ref.preview,previewType=_ref$preview===void 0?'live':_ref$preview,_ref$fullscreen=_ref.fullscreen,fullscreen=_ref$fullscreen===void 0?false:_ref$fullscreen,_ref$overflow=_ref.overflow,overflow=_ref$overflow===void 0?true:_ref$overflow,_ref$previewOptions=_ref.previewOptions,previewOptions=_ref$previewOptions===void 0?{}:_ref$previewOptions,textareaProps=_ref.textareaProps,_ref$maxHeight=_ref.maxHeight,maxHeight=_ref$maxHeight===void 0?1200:_ref$maxHeight,_ref$minHeight=_ref.minHeight,minHeight=_ref$minHeight===void 0?100:_ref$minHeight,autoFocus=_ref.autoFocus,_ref$tabSize=_ref.tabSize,tabSize=_ref$tabSize===void 0?2:_ref$tabSize,_ref$defaultTabEnable=_ref.defaultTabEnable,defaultTabEnable=_ref$defaultTabEnable===void 0?false:_ref$defaultTabEnable,_onChange=_ref.onChange,hideToolbar=_ref.hideToolbar,renderTextarea=_ref.renderTextarea,other=_objectWithoutProperties(_ref,Editor_excluded);var cmds=commands.map(function(item){return commandsFilter?commandsFilter(item,false):item;}).filter(Boolean);var extraCmds=extraCommands.map(function(item){return commandsFilter?commandsFilter(item,true):item;}).filter(Boolean);var _useReducer=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(reducer,{markdown:propsValue,preview:previewType,height:height,highlightEnable:highlightEnable,tabSize:tabSize,defaultTabEnable:defaultTabEnable,scrollTop:0,scrollTopPreview:0,commands:cmds,extraCommands:extraCmds,fullscreen:fullscreen,barPopup:{}}),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var container=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var previewRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var enableScrollRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(enableScroll);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref,function(){return _objectSpread2({},state);});(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return enableScrollRef.current=enableScroll;},[enableScroll]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){var stateInit={};if(container.current){stateInit.container=container.current||undefined;}stateInit.markdown=propsValue||'';stateInit.barPopup={};if(dispatch){dispatch(_objectSpread2(_objectSpread2({},state),stateInit));}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75597
75592
|
},[]);var cls=[className,prefixCls,state.preview?"".concat(prefixCls,"-show-").concat(state.preview):null,state.fullscreen?"".concat(prefixCls,"-fullscreen"):null].filter(Boolean).join(' ').trim();(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return propsValue!==state.markdown&&dispatch({markdown:propsValue||''});},[propsValue,state.markdown]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75598
75593
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return previewType!==state.preview&&dispatch({preview:previewType});},[previewType]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75599
75594
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&dispatch({height:height});},[height]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75600
75595
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return tabSize!==state.tabSize&&dispatch({tabSize:tabSize});},[tabSize]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return highlightEnable!==state.highlightEnable&&dispatch({highlightEnable:highlightEnable});},// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75601
75596
|
[highlightEnable]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75602
75597
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return autoFocus!==state.autoFocus&&dispatch({autoFocus:autoFocus});},[autoFocus]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return fullscreen!==state.fullscreen&&dispatch({fullscreen:fullscreen});},// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75603
|
-
[fullscreen]);var textareaDomRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();var active=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('preview');var initScroll=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){textareaDomRef.current=state.textareaWarp;if(state.textareaWarp){state.textareaWarp.addEventListener('mouseover',function(){active.current='text';});state.textareaWarp.addEventListener('mouseleave',function(){active.current='preview';});}},[state.textareaWarp]);var handleScroll=function handleScroll(e,type){if(!enableScrollRef.current)return;var textareaDom=textareaDomRef.current;var previewDom=previewRef.current?previewRef.current.mdp.current:undefined;if(!initScroll.current){active.current=type;initScroll.current=true;}if(textareaDom&&previewDom){var scale=(textareaDom.scrollHeight-textareaDom.offsetHeight)/(previewDom.scrollHeight-previewDom.offsetHeight);if(e.target===textareaDom&&active.current==='text'){previewDom.scrollTop=textareaDom.scrollTop/scale;}if(e.target===previewDom&&active.current==='preview'){textareaDom.scrollTop=previewDom.scrollTop*scale;}var scrollTop=0;if(active.current==='text'){scrollTop=textareaDom.scrollTop||0;}else if(active.current==='preview'){scrollTop=previewDom.scrollTop||0;}dispatch({scrollTop:scrollTop});}};var mdPreview=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)(esm,_objectSpread2(_objectSpread2({},previewOptions),{},{onScroll:function onScroll(e){return handleScroll(e,'preview');},ref:previewRef,source:state.markdown||'',className:"".concat(prefixCls,"-preview ").concat(previewOptions.className||'')}));},[prefixCls,previewOptions,state.markdown]);return/*#__PURE__*/(0,jsx_runtime.jsx)(EditorContext.Provider,{value:_objectSpread2(_objectSpread2({},state),{},{dispatch:dispatch}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",_objectSpread2(_objectSpread2({ref:container,className:cls},other),{},{onClick:function onClick(){dispatch({barPopup:_objectSpread2({},setGroupPopFalse(state.barPopup))});},style:_objectSpread2(_objectSpread2({},other.style),{},{height:state.fullscreen?'100%':hideToolbar?Number(state.height)-toolbarHeight:state.height}),children:[!hideToolbar&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,height:toolbarHeight}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-content"),style:{height:state.fullscreen?"calc(100% - ".concat(toolbarHeight,"px)"):Number(state.height)-toolbarHeight},children:[/(edit|live)/.test(state.preview||'')&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextArea_TextArea,_objectSpread2(_objectSpread2({className:"".concat(prefixCls,"-input"),prefixCls:prefixCls,autoFocus:autoFocus},textareaProps),{},{onChange:function onChange(evn){_onChange&&_onChange(evn.target.value);if(textareaProps&&textareaProps.onChange){textareaProps.onChange(evn);}},renderTextarea:renderTextarea,onScroll:function onScroll(e){return handleScroll(e,'text');}})),/(live|preview)/.test(state.preview||'')&&mdPreview]}),visiableDragbar&&!state.fullscreen&&/*#__PURE__*/(0,jsx_runtime.jsx)(components_DragBar,{prefixCls:prefixCls,height:state.height,maxHeight:maxHeight,minHeight:minHeight,onChange:function onChange(newHeight){dispatch({height:newHeight});}})]}))});};var mdEditor=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalMDEditor);mdEditor.Markdown=esm;/* harmony default export */ const Editor = (mdEditor);
|
|
75598
|
+
[fullscreen]);var textareaDomRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();var active=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('preview');var initScroll=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){textareaDomRef.current=state.textareaWarp;if(state.textareaWarp){state.textareaWarp.addEventListener('mouseover',function(){active.current='text';});state.textareaWarp.addEventListener('mouseleave',function(){active.current='preview';});}},[state.textareaWarp]);var handleScroll=function handleScroll(e,type){if(!enableScrollRef.current)return;var textareaDom=textareaDomRef.current;var previewDom=previewRef.current?previewRef.current.mdp.current:undefined;if(!initScroll.current){active.current=type;initScroll.current=true;}if(textareaDom&&previewDom){var scale=(textareaDom.scrollHeight-textareaDom.offsetHeight)/(previewDom.scrollHeight-previewDom.offsetHeight);if(e.target===textareaDom&&active.current==='text'){previewDom.scrollTop=textareaDom.scrollTop/scale;}if(e.target===previewDom&&active.current==='preview'){textareaDom.scrollTop=previewDom.scrollTop*scale;}var scrollTop=0;if(active.current==='text'){scrollTop=textareaDom.scrollTop||0;}else if(active.current==='preview'){scrollTop=previewDom.scrollTop||0;}dispatch({scrollTop:scrollTop});}};var mdPreview=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)(esm,_objectSpread2(_objectSpread2({},previewOptions),{},{onScroll:function onScroll(e){return handleScroll(e,'preview');},ref:previewRef,source:state.markdown||'',className:"".concat(prefixCls,"-preview ").concat(previewOptions.className||'')}));},[prefixCls,previewOptions,state.markdown]);return/*#__PURE__*/(0,jsx_runtime.jsx)(EditorContext.Provider,{value:_objectSpread2(_objectSpread2({},state),{},{dispatch:dispatch}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",_objectSpread2(_objectSpread2({ref:container,className:cls},other),{},{onClick:function onClick(){dispatch({barPopup:_objectSpread2({},setGroupPopFalse(state.barPopup))});},style:_objectSpread2(_objectSpread2({},other.style),{},{height:state.fullscreen?'100%':hideToolbar?Number(state.height)-toolbarHeight:state.height}),children:[!hideToolbar&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,height:toolbarHeight,overflow:overflow}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-content"),style:{height:state.fullscreen?"calc(100% - ".concat(toolbarHeight,"px)"):Number(state.height)-toolbarHeight},children:[/(edit|live)/.test(state.preview||'')&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextArea_TextArea,_objectSpread2(_objectSpread2({className:"".concat(prefixCls,"-input"),prefixCls:prefixCls,autoFocus:autoFocus},textareaProps),{},{onChange:function onChange(evn){_onChange&&_onChange(evn.target.value);if(textareaProps&&textareaProps.onChange){textareaProps.onChange(evn);}},renderTextarea:renderTextarea,onScroll:function onScroll(e){return handleScroll(e,'text');}})),/(live|preview)/.test(state.preview||'')&&mdPreview]}),visiableDragbar&&!state.fullscreen&&/*#__PURE__*/(0,jsx_runtime.jsx)(components_DragBar,{prefixCls:prefixCls,height:state.height,maxHeight:maxHeight,minHeight:minHeight,onChange:function onChange(newHeight){dispatch({height:newHeight});}})]}))});};var mdEditor=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalMDEditor);mdEditor.Markdown=esm;/* harmony default export */ const Editor = (mdEditor);
|
|
75604
75599
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
75605
75600
|
/* harmony default export */ const src_0 = (Editor);
|
|
75606
75601
|
})();
|
package/dist/mdeditor.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.wmde-markdown{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:16px;line-height:1.5}.wmde-markdown>:first-child{margin-top:0!important}.wmde-markdown>:last-child{margin-bottom:0!important}.wmde-markdown pre:hover .copied,.wmde-markdown pre[class*=language-]:hover .copied{visibility:visible}.wmde-markdown pre .copied,.wmde-markdown pre[class*=language-] .copied{background:#e3e3e3;border-radius:5px;color:#a5afbb;cursor:pointer;display:flex;font-size:12px;padding:6px;position:absolute;right:6px;top:6px;transition:all .3s;visibility:hidden}.wmde-markdown pre .copied:before,.wmde-markdown pre[class*=language-] .copied:before{content:" ";height:100%;left:0;position:absolute;top:0;width:100%}.wmde-markdown pre .copied .octicon-copy,.wmde-markdown pre[class*=language-] .copied .octicon-copy{display:block}.wmde-markdown pre .copied .octicon-check,.wmde-markdown pre .copied.active .octicon-copy,.wmde-markdown pre[class*=language-] .copied .octicon-check,.wmde-markdown pre[class*=language-] .copied.active .octicon-copy{display:none}.wmde-markdown pre .copied.active .octicon-check,.wmde-markdown pre[class*=language-] .copied.active .octicon-check{display:block}.wmde-markdown pre .copied.active,.wmde-markdown pre .copied:active,.wmde-markdown pre .copied:hover,.wmde-markdown pre[class*=language-] .copied.active,.wmde-markdown pre[class*=language-] .copied:active,.wmde-markdown pre[class*=language-] .copied:hover{background:#2e9b33;color:#fff}.wmde-markdown code[class*=language-],.wmde-markdown pre[class*=language-]{word-wrap:normal;color:#000;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;text-align:left;white-space:pre;word-break:normal;word-spacing:normal}.wmde-markdown pre code{background-color:#f6f8fa;border-radius:6px;display:block;font-size:85%;line-height:1.45;overflow:auto;padding:16px}.wmde-markdown pre{background-color:#f6f8fa;border-radius:3px;line-height:1.45;margin-bottom:18px;overflow-x:auto;position:relative}.wmde-markdown code,.wmde-markdown tt{background-color:rgba(27,31,35,.05);border-radius:3px;font-size:85%;margin:0;padding:.2em .4em}.wmde-markdown code,.wmde-markdown pre,.wmde-markdown tt{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.wmde-markdown img{max-width:100%}.wmde-markdown input{margin:0 .2em .25em -1.6em;vertical-align:middle}.wmde-markdown input+p{display:inline}.wmde-markdown h1,.wmde-markdown h2{border-bottom:1px solid #eaecef;padding-bottom:.3em}.wmde-markdown h1,.wmde-markdown h2,.wmde-markdown h3,.wmde-markdown h4,.wmde-markdown h5,.wmde-markdown h6{font-weight:600;line-height:1.25;margin-bottom:16px;margin-top:24px}.wmde-markdown h1 .anchor,.wmde-markdown h2 .anchor,.wmde-markdown h3 .anchor,.wmde-markdown h4 .anchor,.wmde-markdown h5 .anchor,.wmde-markdown h6 .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}.wmde-markdown h1 .octicon-link,.wmde-markdown h2 .octicon-link,.wmde-markdown h3 .octicon-link,.wmde-markdown h4 .octicon-link,.wmde-markdown h5 .octicon-link,.wmde-markdown h6 .octicon-link{vertical-align:middle;visibility:hidden}.wmde-markdown h1:hover .octicon-link,.wmde-markdown h2:hover .octicon-link,.wmde-markdown h3:hover .octicon-link,.wmde-markdown h4:hover .octicon-link,.wmde-markdown h5:hover .octicon-link,.wmde-markdown h6:hover .octicon-link{visibility:visible}.wmde-markdown h1{font-size:2em}.wmde-markdown h2{font-size:1.5em}.wmde-markdown h3{font-size:1.25em}.wmde-markdown h4{font-size:1em}.wmde-markdown h5{font-size:.875em}.wmde-markdown h6{font-size:.85em}.wmde-markdown ol,.wmde-markdown ul{padding-left:2em}.wmde-markdown ol>p,.wmde-markdown ul>p{margin-bottom:0}.wmde-markdown ul{list-style:disc none outside;list-style:initial;margin-bottom:16px;margin-top:0}.wmde-markdown li{display:list-item}.wmde-markdown ol ol,.wmde-markdown ol ul,.wmde-markdown ul ol,.wmde-markdown ul ul{margin-bottom:0;margin-top:0}.wmde-markdown ul ul ul{list-style-type:square}.wmde-markdown ul ul{list-style-type:circle}.wmde-markdown ul{list-style-type:disc}.wmde-markdown>blockquote,.wmde-markdown>blockquote blockquote{border-left:.25em solid #dfe2e5;color:#6a737d;margin:0;padding:0 1em}.wmde-markdown>blockquote blockquote>:last-child,.wmde-markdown>blockquote>:last-child{margin-bottom:0}.wmde-markdown>blockquote blockquote>:first-child,.wmde-markdown>blockquote>:first-child{margin-top:0}.wmde-markdown hr{border:0;border-top:2px dotted #eee;height:1px;margin:1.5em auto}.wmde-markdown>blockquote table,.wmde-markdown>table{border-collapse:collapse;border-spacing:0;display:block;font-size:14px;overflow:auto;width:100%}.wmde-markdown>blockquote table tr,.wmde-markdown>table tr{background-color:#fff;border-top:1px solid #c6cbd1}.wmde-markdown>blockquote table td,.wmde-markdown>blockquote table th,.wmde-markdown>table td,.wmde-markdown>table th{border:1px solid #dfe2e5;padding:6px 13px}.wmde-markdown blockquote,.wmde-markdown details,.wmde-markdown dl,.wmde-markdown ol,.wmde-markdown p,.wmde-markdown pre,.wmde-markdown table,.wmde-markdown ul{margin-bottom:16px;margin-top:0}.wmde-markdown a{color:#0366d6;text-decoration:none}.wmde-markdown a:hover{text-decoration:underline}.wmde-markdown .namespace{opacity:.7}.wmde-markdown .token.important{font-weight:400}.wmde-markdown .token.bold{font-weight:700}.wmde-markdown .token.italic{font-style:italic}.wmde-markdown .token.entity{cursor:help}.wmde-markdown kbd{background-color:#fafbfc;border:1px solid #d1d5da;border-radius:3px;box-shadow:inset 0 -1px 0 #d1d5da;color:#56595d;display:inline-block;font-family:ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace;font-size:10px;line-height:10px;padding:2px 4px;vertical-align:middle}.wmde-markdown-color .token.tag .attr-value{color:#032f62}.wmde-markdown-color .token.boolean,.wmde-markdown-color .token.constant,.wmde-markdown-color .token.deleted,.wmde-markdown-color .token.function-name,.wmde-markdown-color .token.number,.wmde-markdown-color .token.property,.wmde-markdown-color .token.symbol,.wmde-markdown-color .token.tag{color:#0060c9}.wmde-markdown-color .token.punctuation{color:#a0a0a0}.wmde-markdown-color code[class*=language-]{color:#000}.wmde-markdown-color code[class*=language-] .token.attr-name,.wmde-markdown-color code[class*=language-] .token.builtin,.wmde-markdown-color code[class*=language-] .token.char,.wmde-markdown-color code[class*=language-] .token.function,.wmde-markdown-color code[class*=language-] .token.selector,.wmde-markdown-color code[class*=language-] .token.string{color:#6f42c1}.wmde-markdown-color code[class*=language-] .token.inserted{background-color:#f0fff4;color:#22863a}.wmde-markdown-color code[class*=language-] .token.deleted{background-color:#ffeef0;color:#b31d28}.wmde-markdown-color code[class*=language-] .token.class-name{color:#6f42c1}.wmde-markdown-color code[class*=language-] .code-block{color:#032f62}.wmde-markdown-color code[class*=language-] .token.block-comment,.wmde-markdown-color code[class*=language-] .token.cdata,.wmde-markdown-color code[class*=language-] .token.comment,.wmde-markdown-color code[class*=language-] .token.doctype,.wmde-markdown-color code[class*=language-] .token.prolog{color:#7d8b99}.wmde-markdown-color code[class*=language-] .token.punctuation{color:#a0a0a0}.wmde-markdown-color code[class*=language-] .token.entity,.wmde-markdown-color code[class*=language-] .token.operator,.wmde-markdown-color code[class*=language-] .token.url,.wmde-markdown-color code[class*=language-] .token.variable{background:hsla(0,0%,100%,.5);color:#d73a49}.wmde-markdown-color code[class*=language-] .token.atrule,.wmde-markdown-color code[class*=language-] .token.attr-value{color:#004698}.wmde-markdown-color code[class*=language-] .token.keyword{color:#d63200}.wmde-markdown-color code[class*=language-] .token.important,.wmde-markdown-color code[class*=language-] .token.regex{color:#e90}.wmde-markdown-color code[class*=language-] .token.string{color:#0a53c1}.w-md-editor-aree{border-radius:5px;overflow:auto}.w-md-editor-text{-webkit-font-feature-settings:"liga","clig";font-feature-settings:"liga","clig";box-sizing:border-box;font-size:14px;-webkit-font-variant-ligatures:common-ligatures;font-variant-ligatures:common-ligatures;line-height:18px;margin:0;min-height:100%;overflow-wrap:break-word;padding:10px;position:relative;text-align:left;white-space:pre-wrap;word-break:keep-all}.w-md-editor-text-input,.w-md-editor-text-pre,.w-md-editor-text>.w-md-editor-text-pre{-webkit-font-feature-settings:inherit;font-feature-settings:inherit;text-rendering:inherit;background:none;border:0;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;-webkit-font-variant-ligatures:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;overflow-wrap:inherit;padding:0;tab-size:inherit;text-indent:inherit;text-transform:inherit;white-space:inherit;word-break:inherit;word-break:normal}.w-md-editor-text-input>code,.w-md-editor-text-pre>code,.w-md-editor-text>.w-md-editor-text-pre>code{font-family:inherit}.w-md-editor-text-pre{margin:0;pointer-events:none;position:relative}.w-md-editor-text-input{-webkit-font-smoothing:antialiased;-webkit-text-fill-color:transparent;color:inherit;height:100%;left:0;outline:0;overflow:hidden;padding:inherit;position:absolute;resize:none;top:0;width:100%}.w-md-editor-text-input:empty{-webkit-text-fill-color:inherit!important}.w-md-editor-text-input,.w-md-editor-text-pre{word-wrap:pre;white-space:pre-wrap;word-break:break-word}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.w-md-editor-text-input{color:transparent!important}.w-md-editor-text-input::selection{background-color:#accef7!important;color:transparent!important}}.w-md-editor-text-pre{color:#333}.w-md-editor-text-pre .table .punctuation{color:#c3c3c3}.w-md-editor-text-pre .table .table-header{color:#000}.w-md-editor-text-pre .url{color:#032f62!important}.w-md-editor-text-pre .url .content{color:#0366d6}.w-md-editor-text-pre .hr{color:#999}.w-md-editor-text-pre .blockquote{color:#a6a6a6}.w-md-editor-text-pre .bold,.w-md-editor-text-pre .title{color:#000!important}.w-md-editor-text-pre .title{font-size:unset!important;font-weight:unset!important;line-height:unset!important}.w-md-editor-text-pre .code.keyword{color:#596394!important}.w-md-editor-text-pre .strike{color:#bf4ca0}.w-md-editor-toolbar-child{background-color:#fff;border-radius:3px;box-shadow:0 0 0 1px rgba(16,22,26,.1),0 0 0 rgba(16,22,26,0),0 1px 1px rgba(16,22,26,.2);display:none;position:absolute;z-index:1}.w-md-editor-toolbar-child.active{display:block}.w-md-editor-toolbar-child .w-md-editor-toolbar{border-bottom:0;border-radius:3px;padding:3px}.w-md-editor-toolbar-child .w-md-editor-toolbar ul>li{display:block}.w-md-editor-toolbar-child .w-md-editor-toolbar ul>li button{box-sizing:border-box;height:auto;margin:0;padding:3px 4px 2px;width:-webkit-fill-available}.w-md-editor-toolbar{align-items:center;background-color:#fbfbfb;border-bottom:1px solid #dfdfe0;border-radius:3px 3px 0 0;display:flex;justify-content:space-between;padding:0 5px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.w-md-editor-toolbar li,.w-md-editor-toolbar ul{list-style:none;margin:0;padding:0}.w-md-editor-toolbar li{display:inline-block;font-size:14px}.w-md-editor-toolbar li>button{background:none;border:none;border-radius:2px;color:#586069;cursor:pointer;font-weight:400;height:20px;line-height:14px;margin:0 1px;outline:none;overflow:visible;padding:4px;text-transform:none;transition:all .3s;white-space:nowrap}.w-md-editor-toolbar li>button:focus,.w-md-editor-toolbar li>button:hover{background-color:#dcdcdc;color:#06c}.w-md-editor-toolbar li>button:active{background-color:#dcdcdc;color:#6a57ff}.w-md-editor-toolbar li>button:disabled{color:#ccc;cursor:not-allowed}.w-md-editor-toolbar li>button:disabled:hover{background-color:transparent;color:#ccc}.w-md-editor-toolbar li.active>button{background-color:#e8e8e8;color:#06c}.w-md-editor-toolbar-divider{background-color:#ccc;height:14px;margin:-3px 3px 0!important;vertical-align:middle;width:1px}.w-md-editor-bar{border-radius:0 0 3px 0;cursor:s-resize;height:10px;margin-right:0;margin-top:-11px;position:absolute;right:0;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:14px;z-index:3}.w-md-editor-bar svg{display:block;margin:0 auto}.w-md-editor{background-color:#fff;border-radius:3px;box-shadow:0 0 0 1px rgba(16,22,26,.1),0 0 0 rgba(16,22,26,0),0 1px 1px rgba(16,22,26,.2);color:#24292e;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding-bottom:1px;position:relative;text-align:left}.w-md-editor-content{border-radius:0 0 3px 0;height:calc(100% - 39.1px);position:relative}.w-md-editor-input{height:100%;width:50%}.w-md-editor-preview{bottom:0;box-shadow:inset 1px 0 0 0 #dfdfe0;box-sizing:border-box;overflow:auto;padding:10px 20px;position:absolute;right:0;top:0;width:50%}.w-md-editor-preview .anchor{display:none}.w-md-editor-preview .contains-task-list{list-style:none}.w-md-editor-show-preview .w-md-editor-input{background-color:#fdfdfd;overflow:hidden;width:0}.w-md-editor-show-preview .w-md-editor-preview{box-shadow:inset 0 0 0 0;width:100%}.w-md-editor-show-edit .w-md-editor-input{width:100%}.w-md-editor-show-edit .w-md-editor-preview{padding:0;width:0}.w-md-editor-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:99999}.w-md-editor-fullscreen .w-md-editor-content{height:100%}
|
|
1
|
+
.wmde-markdown{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:16px;line-height:1.5}.wmde-markdown>:first-child{margin-top:0!important}.wmde-markdown>:last-child{margin-bottom:0!important}.wmde-markdown pre:hover .copied,.wmde-markdown pre[class*=language-]:hover .copied{visibility:visible}.wmde-markdown pre .copied,.wmde-markdown pre[class*=language-] .copied{background:#e3e3e3;border-radius:5px;color:#a5afbb;cursor:pointer;display:flex;font-size:12px;padding:6px;position:absolute;right:6px;top:6px;transition:all .3s;visibility:hidden}.wmde-markdown pre .copied:before,.wmde-markdown pre[class*=language-] .copied:before{content:" ";height:100%;left:0;position:absolute;top:0;width:100%}.wmde-markdown pre .copied .octicon-copy,.wmde-markdown pre[class*=language-] .copied .octicon-copy{display:block}.wmde-markdown pre .copied .octicon-check,.wmde-markdown pre .copied.active .octicon-copy,.wmde-markdown pre[class*=language-] .copied .octicon-check,.wmde-markdown pre[class*=language-] .copied.active .octicon-copy{display:none}.wmde-markdown pre .copied.active .octicon-check,.wmde-markdown pre[class*=language-] .copied.active .octicon-check{display:block}.wmde-markdown pre .copied.active,.wmde-markdown pre .copied:active,.wmde-markdown pre .copied:hover,.wmde-markdown pre[class*=language-] .copied.active,.wmde-markdown pre[class*=language-] .copied:active,.wmde-markdown pre[class*=language-] .copied:hover{background:#2e9b33;color:#fff}.wmde-markdown code[class*=language-],.wmde-markdown pre[class*=language-]{word-wrap:normal;color:#000;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none;text-align:left;white-space:pre;word-break:normal;word-spacing:normal}.wmde-markdown pre code{background-color:#f6f8fa;border-radius:6px;display:block;font-size:85%;line-height:1.45;overflow:auto;padding:16px}.wmde-markdown pre{background-color:#f6f8fa;border-radius:3px;line-height:1.45;margin-bottom:18px;overflow-x:auto;position:relative}.wmde-markdown code,.wmde-markdown tt{background-color:rgba(27,31,35,.05);border-radius:3px;font-size:85%;margin:0;padding:.2em .4em}.wmde-markdown code,.wmde-markdown pre,.wmde-markdown tt{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.wmde-markdown img{max-width:100%}.wmde-markdown input{margin:0 .2em .25em -1.6em;vertical-align:middle}.wmde-markdown input+p{display:inline}.wmde-markdown h1,.wmde-markdown h2{border-bottom:1px solid #eaecef;padding-bottom:.3em}.wmde-markdown h1,.wmde-markdown h2,.wmde-markdown h3,.wmde-markdown h4,.wmde-markdown h5,.wmde-markdown h6{font-weight:600;line-height:1.25;margin-bottom:16px;margin-top:24px}.wmde-markdown h1 .anchor,.wmde-markdown h2 .anchor,.wmde-markdown h3 .anchor,.wmde-markdown h4 .anchor,.wmde-markdown h5 .anchor,.wmde-markdown h6 .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}.wmde-markdown h1 .octicon-link,.wmde-markdown h2 .octicon-link,.wmde-markdown h3 .octicon-link,.wmde-markdown h4 .octicon-link,.wmde-markdown h5 .octicon-link,.wmde-markdown h6 .octicon-link{vertical-align:middle;visibility:hidden}.wmde-markdown h1:hover .octicon-link,.wmde-markdown h2:hover .octicon-link,.wmde-markdown h3:hover .octicon-link,.wmde-markdown h4:hover .octicon-link,.wmde-markdown h5:hover .octicon-link,.wmde-markdown h6:hover .octicon-link{visibility:visible}.wmde-markdown h1{font-size:2em}.wmde-markdown h2{font-size:1.5em}.wmde-markdown h3{font-size:1.25em}.wmde-markdown h4{font-size:1em}.wmde-markdown h5{font-size:.875em}.wmde-markdown h6{font-size:.85em}.wmde-markdown ol,.wmde-markdown ul{padding-left:2em}.wmde-markdown ol>p,.wmde-markdown ul>p{margin-bottom:0}.wmde-markdown ul{margin-bottom:16px;margin-top:0}.wmde-markdown li{display:list-item}.wmde-markdown ol ol,.wmde-markdown ol ul,.wmde-markdown ul ol,.wmde-markdown ul ul{margin-bottom:0;margin-top:0}.wmde-markdown ul ul ul{list-style-type:square}.wmde-markdown ul ul{list-style-type:circle}.wmde-markdown ul{list-style-type:disc}.wmde-markdown>blockquote,.wmde-markdown>blockquote blockquote{border-left:.25em solid #dfe2e5;color:#6a737d;margin:0;padding:0 1em}.wmde-markdown>blockquote blockquote>:last-child,.wmde-markdown>blockquote>:last-child{margin-bottom:0}.wmde-markdown>blockquote blockquote>:first-child,.wmde-markdown>blockquote>:first-child{margin-top:0}.wmde-markdown hr{border:0;border-top:2px dotted #eee;height:1px;margin:1.5em auto}.wmde-markdown>blockquote table,.wmde-markdown>table{border-collapse:collapse;border-spacing:0;display:block;font-size:14px;overflow:auto;width:100%}.wmde-markdown>blockquote table tr,.wmde-markdown>table tr{background-color:#fff;border-top:1px solid #c6cbd1}.wmde-markdown>blockquote table td,.wmde-markdown>blockquote table th,.wmde-markdown>table td,.wmde-markdown>table th{border:1px solid #dfe2e5;padding:6px 13px}.wmde-markdown blockquote,.wmde-markdown details,.wmde-markdown dl,.wmde-markdown ol,.wmde-markdown p,.wmde-markdown pre,.wmde-markdown table,.wmde-markdown ul{margin-bottom:16px;margin-top:0}.wmde-markdown a{color:#0366d6;text-decoration:none}.wmde-markdown a:hover{text-decoration:underline}.wmde-markdown .namespace{opacity:.7}.wmde-markdown .token.important{font-weight:400}.wmde-markdown .token.bold{font-weight:700}.wmde-markdown .token.italic{font-style:italic}.wmde-markdown .token.entity{cursor:help}.wmde-markdown kbd{background-color:#fafbfc;border:1px solid #d1d5da;border-radius:3px;box-shadow:inset 0 -1px 0 #d1d5da;color:#56595d;display:inline-block;font-family:ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace;font-size:10px;line-height:10px;padding:2px 4px;vertical-align:middle}.wmde-markdown-color .token.tag .attr-value{color:#032f62}.wmde-markdown-color .token.boolean,.wmde-markdown-color .token.constant,.wmde-markdown-color .token.deleted,.wmde-markdown-color .token.function-name,.wmde-markdown-color .token.number,.wmde-markdown-color .token.property,.wmde-markdown-color .token.symbol,.wmde-markdown-color .token.tag{color:#0060c9}.wmde-markdown-color .token.punctuation{color:#a0a0a0}.wmde-markdown-color code[class*=language-]{color:#000}.wmde-markdown-color code[class*=language-] .token.attr-name,.wmde-markdown-color code[class*=language-] .token.builtin,.wmde-markdown-color code[class*=language-] .token.char,.wmde-markdown-color code[class*=language-] .token.function,.wmde-markdown-color code[class*=language-] .token.selector,.wmde-markdown-color code[class*=language-] .token.string{color:#6f42c1}.wmde-markdown-color code[class*=language-] .token.inserted{background-color:#f0fff4;color:#22863a}.wmde-markdown-color code[class*=language-] .token.deleted{background-color:#ffeef0;color:#b31d28}.wmde-markdown-color code[class*=language-] .token.class-name{color:#6f42c1}.wmde-markdown-color code[class*=language-] .code-block{color:#032f62}.wmde-markdown-color code[class*=language-] .token.block-comment,.wmde-markdown-color code[class*=language-] .token.cdata,.wmde-markdown-color code[class*=language-] .token.comment,.wmde-markdown-color code[class*=language-] .token.doctype,.wmde-markdown-color code[class*=language-] .token.prolog{color:#7d8b99}.wmde-markdown-color code[class*=language-] .token.punctuation{color:#a0a0a0}.wmde-markdown-color code[class*=language-] .token.entity,.wmde-markdown-color code[class*=language-] .token.operator,.wmde-markdown-color code[class*=language-] .token.url,.wmde-markdown-color code[class*=language-] .token.variable{background:hsla(0,0%,100%,.5);color:#d73a49}.wmde-markdown-color code[class*=language-] .token.atrule,.wmde-markdown-color code[class*=language-] .token.attr-value{color:#004698}.wmde-markdown-color code[class*=language-] .token.keyword{color:#d63200}.wmde-markdown-color code[class*=language-] .token.important,.wmde-markdown-color code[class*=language-] .token.regex{color:#e90}.wmde-markdown-color code[class*=language-] .token.string{color:#0a53c1}.w-md-editor-aree{border-radius:5px;overflow:auto}.w-md-editor-text{-webkit-font-feature-settings:"liga","clig";font-feature-settings:"liga","clig";box-sizing:border-box;font-size:14px;-webkit-font-variant-ligatures:common-ligatures;font-variant-ligatures:common-ligatures;line-height:18px;margin:0;min-height:100%;overflow-wrap:break-word;padding:10px;position:relative;text-align:left;white-space:pre-wrap;word-break:keep-all}.w-md-editor-text-input,.w-md-editor-text-pre,.w-md-editor-text>.w-md-editor-text-pre{-webkit-font-feature-settings:inherit;font-feature-settings:inherit;text-rendering:inherit;background:none;border:0;box-sizing:inherit;display:inherit;font-family:inherit;font-size:inherit;font-style:inherit;-webkit-font-variant-ligatures:inherit;font-variant-ligatures:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;overflow-wrap:inherit;padding:0;tab-size:inherit;text-indent:inherit;text-transform:inherit;white-space:inherit;word-break:inherit;word-break:normal}.w-md-editor-text-input>code,.w-md-editor-text-pre>code,.w-md-editor-text>.w-md-editor-text-pre>code{font-family:inherit}.w-md-editor-text-pre{margin:0;pointer-events:none;position:relative}.w-md-editor-text-input{-webkit-font-smoothing:antialiased;-webkit-text-fill-color:transparent;color:inherit;height:100%;left:0;outline:0;overflow:hidden;padding:inherit;position:absolute;resize:none;top:0;width:100%}.w-md-editor-text-input:empty{-webkit-text-fill-color:inherit!important}.w-md-editor-text-input,.w-md-editor-text-pre{word-wrap:pre;white-space:pre-wrap;word-break:break-word}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.w-md-editor-text-input{color:transparent!important}.w-md-editor-text-input::selection{background-color:#accef7!important;color:transparent!important}}.w-md-editor-text-pre{color:#333}.w-md-editor-text-pre .table .punctuation{color:#c3c3c3}.w-md-editor-text-pre .table .table-header{color:#000}.w-md-editor-text-pre .url{color:#032f62!important}.w-md-editor-text-pre .url .content{color:#0366d6}.w-md-editor-text-pre .hr{color:#999}.w-md-editor-text-pre .blockquote{color:#a6a6a6}.w-md-editor-text-pre .bold,.w-md-editor-text-pre .title{color:#000!important}.w-md-editor-text-pre .title{font-size:unset!important;font-weight:unset!important;line-height:unset!important}.w-md-editor-text-pre .code.keyword{color:#596394!important}.w-md-editor-text-pre .strike{color:#bf4ca0}.w-md-editor-toolbar-child{background-color:#fff;border-radius:3px;box-shadow:0 0 0 1px rgba(16,22,26,.1),0 0 0 rgba(16,22,26,0),0 1px 1px rgba(16,22,26,.2);display:none;position:absolute;z-index:1}.w-md-editor-toolbar-child.active{display:block}.w-md-editor-toolbar-child .w-md-editor-toolbar{border-bottom:0;border-radius:3px;padding:3px}.w-md-editor-toolbar-child .w-md-editor-toolbar ul>li{display:block}.w-md-editor-toolbar-child .w-md-editor-toolbar ul>li button{box-sizing:border-box;height:auto;margin:0;padding:3px 4px 2px;width:-webkit-fill-available}.w-md-editor-toolbar{align-items:center;background-color:#fbfbfb;border-bottom:1px solid #dfdfe0;border-radius:3px 3px 0 0;display:flex;justify-content:space-between;padding:0 5px;-webkit-user-select:none;-ms-user-select:none;user-select:none}.w-md-editor-toolbar li,.w-md-editor-toolbar ul{list-style:none;margin:0;padding:0}.w-md-editor-toolbar li{display:inline-block;font-size:14px}.w-md-editor-toolbar li>button{background:none;border:none;border-radius:2px;color:#586069;cursor:pointer;font-weight:400;height:20px;line-height:14px;margin:0 1px;outline:none;overflow:visible;padding:4px;text-transform:none;transition:all .3s;white-space:nowrap}.w-md-editor-toolbar li>button:focus,.w-md-editor-toolbar li>button:hover{background-color:#dcdcdc;color:#06c}.w-md-editor-toolbar li>button:active{background-color:#dcdcdc;color:#6a57ff}.w-md-editor-toolbar li>button:disabled{color:#ccc;cursor:not-allowed}.w-md-editor-toolbar li>button:disabled:hover{background-color:transparent;color:#ccc}.w-md-editor-toolbar li.active>button{background-color:#e8e8e8;color:#06c}.w-md-editor-toolbar-divider{background-color:#ccc;height:14px;margin:-3px 3px 0!important;vertical-align:middle;width:1px}.w-md-editor-bar{border-radius:0 0 3px 0;cursor:s-resize;height:10px;margin-right:0;margin-top:-11px;position:absolute;right:0;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:14px;z-index:3}.w-md-editor-bar svg{display:block;margin:0 auto}.w-md-editor{background-color:#fff;border-radius:3px;box-shadow:0 0 0 1px rgba(16,22,26,.1),0 0 0 rgba(16,22,26,0),0 1px 1px rgba(16,22,26,.2);color:#24292e;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding-bottom:1px;position:relative;text-align:left}.w-md-editor-content{border-radius:0 0 3px 0;height:calc(100% - 39.1px);position:relative}.w-md-editor-input{height:100%;width:50%}.w-md-editor-preview{bottom:0;box-shadow:inset 1px 0 0 0 #dfdfe0;box-sizing:border-box;overflow:auto;padding:10px 20px;position:absolute;right:0;top:0;width:50%}.w-md-editor-preview .anchor{display:none}.w-md-editor-preview .contains-task-list{list-style:none}.w-md-editor-show-preview .w-md-editor-input{background-color:#fdfdfd;overflow:hidden;width:0}.w-md-editor-show-preview .w-md-editor-preview{box-shadow:inset 0 0 0 0;width:100%}.w-md-editor-show-edit .w-md-editor-input{width:100%}.w-md-editor-show-edit .w-md-editor-preview{padding:0;width:0}.w-md-editor-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:99999}.w-md-editor-fullscreen .w-md-editor-content{height:100%}
|