Code Syntax Highlight Plugin
BlogProgWEB opened this issue · comments
BlogProgWEB commented
I try include Code Syntax Highlight Plugin
Install packages:
npm i @toast-ui/editor-plugin-code-syntax-highlight --save
npm i highlight.js --save
Added to code:
import codeSyntaxHighlight from '@toast-ui/editor-plugin-code-syntax-highlight';
import hljs from 'highlight.js';
const editor = new Editor({
plugins: [[codeSyntaxHighlight, { hljs }]],
el: document.querySelector('#editor'),
height: '400px',
initialEditType: 'markdown',
placeholder: 'Write something cool!',
})
Could you tell me what to do about it?
Maybe you can. At the same time, there will be a good demo and tutorial. Also, you can update the article on the site :)