A DraftJS plugin to add syntax highlighting support to your code blocks. Use in combination with draft-js-plugins
.
import Prism from 'prismjs';
import createPrismPlugin from 'draft-js-prism-plugin';
const prismPlugin = createPrismPlugin({
// Provide your own instance of PrismJS
prism: Prism
});
This code uses the draft-js-prism
decorator by @SamyPesse and is based on code extracted from the draft-js-markdown-shortcuts-plugin
by @ngs.
Licensed under the MIT License, Copyright Šī¸ 2017 Space Program Inc. See LICENSE.md for more information.