jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.38k stars 1.15k forks source link

How do I add buttons to highlight code ? #1380

Open ArtemLapys opened 1 year ago

ArtemLapys commented 1 year ago

Hello. Please tell me how you can add buttons to the toolbar for formatting Python and C++ code (you can also add cartoons with a sub-library, but this is how it turns out). I've been trying to add it for 2 days, I tried several ways, but the buttons still didn't appear in the toolbar (and I added them to options[prism,python,cpp,muliline] and blocktype (similarly, only without prism). I tried to use the libraries: draft-js-prism-plugin, draft-js-prism and many others (I just deleted it and don't remember).