megadraft-codeblock-plugin
npm install megadraft-codeblock-pluginInclude the plugin in the plugins prop of your Megadraft instance.
``js
import React from "react";
import ReactDOM from "react-dom";
import Megadraft from "megadraft";
import plugin from "megadraft-codeblock-plugin";
class Example extends React.Component {
render(){
return (
);
}
}
ReactDOM.render(
`
Install, run, test.
`Install npm dependencies
make setup
If you're constantly running tests, there's a faster alternative using mocha's
watch feature:
`
make watch_unit
`Releasing
There's a
prepublish script entry on package.json that runs build tasks
before publishing the package.`
npm publish
``The sample plugin uses the extension icon from https://design.google.com/icons/
under Apache License Version 2.0.