sstur / draft-js-utils

DraftJS: import/export ContentState to and from HTML/Markdown
ISC License
883 stars 234 forks source link

Example for markup code-block export #214

Open n3ssi3 opened 4 years ago

n3ssi3 commented 4 years ago

Hey there,

Is there an example code on how we have to set the code language so it gets exported correctly? https://github.com/sstur/draft-js-utils/blob/master/packages/draft-js-export-markdown/src/stateToMarkdown.js#L135

Screenshot 2020-03-26 at 11 59 41

I added a dropdown to select the code language, but now I don't know how to update the block so the code language gets exported with it.

Thanks