Auto code blocking/syntax highlighter in slate.js

49 Views Asked by At

I'm creating a markdown editor for a chat I am making, and I want to render, in addition, code blocks. I already have the basics of markdown, for example, italics, bold fonts, and single code blocks, how would I do the same for syntax highlighting?

  function greeting(hello) {
    return console.log(hello);
 }

The code above is a reference for what I want, and please use this for an example: https://exuberant-forested-roo.glitch.me/

I've tried adding a new element type, with its corresponding phrase which in this case would be: '```', with no prevail.

0

There are 0 best solutions below