npm install @toast-ui/editor-plugin-code-syntax-highlight
npm install prismjs
npm i --save-dev @types/prismjs
Importing plugin in the Angular 12 component
import codeSyntaxHighlight from "@toast-ui/editor-plugin-code-syntax-highlight";
After import, it gives error
Error: node_modules/@toast-ui/editor-plugin-code-syntax-highlight/types/index.d.ts:2:8 - error TS1192: Module '"/../app/node_modules/@types/prismjs/index"' has no default export.
2 import Prism from 'prismjs';
To Reproduce
Install the dependencies in the Angular 12 project
Import the plugin
Run ng s
It will give the error
Expected behaviour
It should be working
Screenshots
Desktop (please complete the following information):
OS: iOS
Browser chrome
Version 92.0.4515.131 (Official Build) (x86_64)
Additional context
Add any other context about the problem here.
@toast-ui/editor: 3.0.2
@toast-ui/editor-plugin-code-syntax-highlight: 3.0.0
prismjs: 1.24.1
@types/prismjs: 1.16.6
typescript: 4.3.2
node: 14.17.0
Describe the bug
Installed following packages
Importing plugin in the Angular 12 component
After import, it gives error
To Reproduce
ng s
Expected behaviour
It should be working
Screenshots
Desktop (please complete the following information):
Additional context
Add any other context about the problem here. @toast-ui/editor: 3.0.2 @toast-ui/editor-plugin-code-syntax-highlight: 3.0.0 prismjs: 1.24.1 @types/prismjs: 1.16.6 typescript: 4.3.2 node: 14.17.0