Skip to content

Commit

Permalink
Update FileEditContainer.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
kokofixcomputers authored Oct 26, 2024
1 parent e54565b commit 01bba94
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import ErrorBoundary from '@/components/elements/ErrorBoundary';
import { encodePathSegments, hashToPath } from '@/helpers';
import { dirname } from 'path';
import { Editor } from '@monaco-editor/react';
import { MonacoMarkdownExtension } from 'monaco-markdown';
import { useMonacoEx } from 'monaco-editor-ex';
import CodemirrorEditor from '@/components/elements/CodemirrorEditor';
import tw from 'twin.macro';
Expand Down Expand Up @@ -139,13 +138,6 @@ export default () => {
if (error) {
return <ServerError message={error} onBack={() => history.goBack()} />;
}
const initializeMarkdownExtension = (editor, monaco) => {
const language = getLanguageFromFilename(hash.replace(/^#/, ''));
if (language === 'markdown') {
const markdownExtension = new MonacoMarkdownExtension();
markdownExtension.activate(editor);
}
};

return (
<PageContentBlock>
Expand Down Expand Up @@ -202,7 +194,6 @@ export default () => {
onMount={(editor, monaco) => {
editorRef.current = editor;
useMonacoEx(monaco); // Integrate monaco-editor-ex
initializeMarkdownExtension(editor, monaco); // Initialize Markdown extension if applicable
}}
/>
)}
Expand Down

0 comments on commit 01bba94

Please sign in to comment.