+
+ {renderTextarea ? (
+ React.cloneElement(
+ renderTextarea(
+ {
+ ...otherProps,
+ value: markdown,
+ autoComplete: 'off',
+ autoCorrect: 'off',
+ spellCheck: 'false',
+ autoCapitalize: 'off',
+ className: `${prefixCls}-text-input`,
+ style: {
+ WebkitTextFillColor: 'inherit',
+ overflow: 'auto',
+ },
+ },
+ {
+ dispatch,
+ onChange: otherProps.onChange,
+ shortcuts,
+ useContext: { commands, extraCommands, commandOrchestrator: executeRef.current },
+ },
+ ),
+ {
+ ref: textRef,
+ },
+ )
+ ) : (
+
+
+
+ )}
+
+
+ );
+}
diff --git a/core/src/components/TextArea/index.tsx b/core/src/components/TextArea/index.tsx
index 908d82a35..6a3700952 100644
--- a/core/src/components/TextArea/index.tsx
+++ b/core/src/components/TextArea/index.tsx
@@ -3,7 +3,7 @@ import { EditorContext, ContextStore, ExecuteCommandState } from '../../Context'
import shortcuts from './shortcuts';
import Markdown from './Markdown';
import Textarea, { TextAreaProps } from './Textarea';
-import { IProps } from '../../Editor';
+import { IProps } from '../../Types';
import { TextAreaCommandOrchestrator, ICommand } from '../../commands';
import './index.less';
diff --git a/core/src/components/Toolbar/Child.tsx b/core/src/components/Toolbar/Child.tsx
index 2baf7f636..70048281e 100644
--- a/core/src/components/Toolbar/Child.tsx
+++ b/core/src/components/Toolbar/Child.tsx
@@ -1,6 +1,6 @@
import React, { useContext, useMemo } from 'react';
import './Child.less';
-import Toolbar, { IToolbarProps } from './';
+import Toolbar, { type IToolbarProps } from './';
import { EditorContext } from '../../Context';
export type ChildProps = IToolbarProps & {
diff --git a/core/src/components/Toolbar/index.tsx b/core/src/components/Toolbar/index.tsx
index 6ed963999..d6384df18 100644
--- a/core/src/components/Toolbar/index.tsx
+++ b/core/src/components/Toolbar/index.tsx
@@ -1,5 +1,5 @@
import React, { Fragment, useContext, useEffect, useRef } from 'react';
-import { IProps } from '../../Editor';
+import { IProps } from '../../Types';
import { EditorContext, PreviewType, ContextStore } from '../../Context';
import { ICommand } from '../../commands';
import Child from './Child';
diff --git a/core/src/index.nohighlight.tsx b/core/src/index.nohighlight.tsx
new file mode 100644
index 000000000..7f3e341da
--- /dev/null
+++ b/core/src/index.nohighlight.tsx
@@ -0,0 +1,16 @@
+import MDEditor from './Editor.nohighlight';
+import * as commands from './commands';
+import * as MarkdownUtil from './utils/markdownUtils';
+import './index.less';
+
+export * from './commands';
+export * from './commands/group';
+export * from './utils/markdownUtils';
+export * from './utils/InsertTextAtPosition';
+export * from './Editor.nohighlight';
+export * from './Context';
+export * from './Types';
+
+export { MarkdownUtil, commands };
+
+export default MDEditor;
diff --git a/core/src/index.tsx b/core/src/index.tsx
index 1618c40de..990864347 100644
--- a/core/src/index.tsx
+++ b/core/src/index.tsx
@@ -1,6 +1,7 @@
import MDEditor from './Editor';
import * as commands from './commands';
import * as MarkdownUtil from './utils/markdownUtils';
+import './index.less';
export * from './commands';
export * from './commands/group';
@@ -8,6 +9,7 @@ export * from './utils/markdownUtils';
export * from './utils/InsertTextAtPosition';
export * from './Editor';
export * from './Context';
+export * from './Types';
export { MarkdownUtil, commands };