|
|
@@ -9,7 +9,7 @@ import type { ReactCodeMirrorProps } from '@uiw/react-codemirror';
|
|
|
import { GlobalCodeMirrorEditorKey, AcceptedUploadFileType } from '../../consts';
|
|
|
import { useFileDropzone, FileDropzoneOverlay } from '../../services';
|
|
|
import {
|
|
|
- getStrFromBolToSelectedUpperPos, adjustPasteData,
|
|
|
+ getStrFromBol, adjustPasteData,
|
|
|
} from '../../services/list-util/markdown-list-util';
|
|
|
import { useCodeMirrorEditorIsolated } from '../../stores';
|
|
|
|
|
|
@@ -72,13 +72,6 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const strFromBol = getStrFromBolToSelectedUpperPos(editor);
|
|
|
-
|
|
|
- const testVar = strFromBol;
|
|
|
-
|
|
|
- console.log(testVar);
|
|
|
- console.log('kohsei');
|
|
|
-
|
|
|
if (event.clipboardData == null) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -91,6 +84,8 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
|
|
|
|
|
|
const textData = event.clipboardData.getData('text/plain');
|
|
|
|
|
|
+ const strFromBol = getStrFromBol(editor);
|
|
|
+
|
|
|
const adjusted = adjustPasteData(strFromBol, textData);
|
|
|
|
|
|
if (adjusted != null) {
|