Struggling with integrating the @toast-ui/editor into my native JavaScript project. The editor is not displaying due to this error message:
Cannot read property 'PluginKey' of undefined"
This error is specifically within the toastui-editor module. Here's a snippet of my code:
<div id="editor"></div>
<script src="node_modules/@toast-ui/editor/dist/toastui-editor.js"></script>
<script src="node_modules/@toast-ui/editor/dist/toastui-editor-viewer.js"></script>
<script>
const { Editor } = toastui;
var editor = new Editor({
el: document.querySelector("#editor"),
initialEditType: "markdown",
previewStyle: "vertical",
toolbarItems: [['heading', 'bold', 'italic', 'ol', 'ul']],
});
</script>
Despite including all necessary JavaScript files and following the documentation, the issue persists.
Prefer not to rely on CDN links for this library.