Neurotic Pumpkin Murderer

    marked-cloudinary

    0.1.0 • Public • Published

    marked-cloudinary

    nodei.co

    npm

    github-issues

    stars

    forks

    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 }
    )
    // <img src="http://res.cloudinary.com/my-cloud-name/image/upload/c_fill,h_300,w_400/v1/cloudinary_id" alt="image alt"> "image title"

    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

    Install

    npm i marked-cloudinary

    DownloadsWeekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • leviwheatcroft