Skip to content

alexWang007/draft-js-prism-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

draft-js-prism-plugin

A DraftJS plugin to add syntax highlighting support to your code blocks. Use in combination with draft-js-plugins.

Usage

import Prism from 'prismjs';
import createPrismPlugin from 'draft-js-prism-plugin';

const prismPlugin = createPrismPlugin({
  // Provide your own instance of PrismJS
  prism: Prism
});

License

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.

About

Add syntax highlighting support to your DraftJS editor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%