Skip to content

Commit

Permalink
feat: monaco loader export
Browse files Browse the repository at this point in the history
  • Loading branch information
asabotovich committed Oct 25, 2023
1 parent 3595914 commit eb063df
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/FormEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
import styled from 'styled-components';
import { useDropzone } from 'react-dropzone';
import Editor, { loader } from '@monaco-editor/react';
import Editor from '@monaco-editor/react';
import { danger10, gapS, gapXs, gray2, gray3, gray4, gray6, gray8, radiusS, textColor } from '@taskany/colors';
import { IconAttachOutline } from '@taskany/icons';

Expand All @@ -15,11 +15,7 @@ import { formContext } from '../context/form';
import { Popup } from './Popup/Popup';
import { Link } from './Link/Link';

loader.config({
paths: {
vs: process.env.NEXT_PUBLIC_MONACO_CDN || 'https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs',
},
});
export { loader as editorLoader } from '@monaco-editor/react';

interface FormEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onBlur' | 'onFocus'> {
id?: string;
Expand Down

0 comments on commit eb063df

Please sign in to comment.