At first, I tried to download npm install @toast-ui/react-editor, but I couldn't download it, so I downloaded it to npm install @toast-ui/react-editor --force and wrote the code
import { Editor } from '@toast-ui/react-editor';
import '@toast-ui/editor/dist/toastui-editor.css';
export default function ToastEditor() {
return (
<div>
<Editor
previewStyle="vertical"
height="300px"
toolbarItems={[
['heading', 'bold', 'italic', 'strike'],
['hr', 'quote'],
['ul', 'ol', 'task', 'indent', 'outdent'],
['table', 'image', 'link'],
['code', 'codeblock']
]}
useCommandShortcut={false}
></Editor>
</div>
);
}
But there are some weird things written in the editor, so I can do it
I set the initialValue to ' ', but I can't see the placeholder
import { Editor } from '@toast-ui/react-editor';
import '@toast-ui/editor/dist/toastui-editor.css';
export default function ToastEditor() {
return (
<div>
<Editor
previewStyle="vertical"
height="300px"
toolbarItems={[
['heading', 'bold', 'italic', 'strike'],
['hr', 'quote'],
['ul', 'ol', 'task', 'indent', 'outdent'],
['table', 'image', 'link'],
['code', 'codeblock']
]}
useCommandShortcut={false}
initialValue=' '
placeholder='sadf'
></Editor>
</div>
);
}