bisheng-plugin-local-img
v1.0.9
Published
change <img> to React code block if src is local file path
Downloads
2
Readme
Convert local image in markdown file to ReactDom.render
Example:
<img src="./office.jpg" width="100px">
to
```__react
ReactDOM.render(<img src={require('./office.jpg')} width="100px"/>, mountNode);```
Usage
Install:
npm i --save bisheng-plugin-local-img
Add 'bisheng-plugin-localimg' to bisehng.config.js
's plugins.
module.exports = {
plugins: ['bisheng-plugin-local-img'],
};