marked-cloudinary
marked / cloudinary
renderer to generate cloudinary urls.
install
npm i --save marked-cloudinary
usage
import markedCloudinary from 'markedCloudinary'
import marked from 'marked'
const renderer = new marked.Renderer()
renderer.image = markedCloudinary('my-cloud-name')
marked(
'![image alt](cloudinary_id "image title { width: 400, height: 300, crop: \'fill\'}")',
{ renderer }
)
quotes
The example above shows a problem you run into if trying to declare strings in
js. The escaped quotes will work fine in this case.
In a markdown file, you can just use single quotes for string parameters.
compatibility
dist/index.js
should be fully compatible with node 6
Author
Levi Wheatcroft levi@wht.cr
Contributing
Contributions welcome; Please submit all pull requests against the master
branch.
License
MIT