{"_id":"@danifoldi/markdown-it-imsize","_rev":"1-1400b6b97ba435f3cd2d54f98936312b","name":"@danifoldi/markdown-it-imsize","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@danifoldi/markdown-it-imsize","version":"3.0.0","description":"Markdown-it plugin to specify image size","main":"lib/index.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/tatsy/markdown-it-imsize.git"},"author":{"name":"tatsy"},"license":"MIT","bugs":{"url":"https://github.com/tatsy/markdown-it-imsize/issues"},"homepage":"https://github.com/tatsy/markdown-it-imsize","keywords":["markdown-it","markdown-it-plugin"],"dependencies":{},"devDependencies":{"chai":"^3.0.0","coveralls":"^2.11.2","eslint":"^0.24.0","eslint-plugin-nodeca":"^1.0.3","istanbul":"^0.3.17","markdown-it":"^4.3.0","markdown-it-testgen":"^0.1.4","mocha":"^2.2.5","should":"^7.0.1","uglify-js":"^2.4.23","webpack":"^1.10.1"},"gitHead":"4879254b6c071af465a585c51f899d80b95ef454","_id":"@danifoldi/markdown-it-imsize@3.0.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-+WkrmIWkYRnQKnFMppTAaBifn57hR2eOD0nAJZkZ2kCcE63CzhufiHLSaphQM4IWsIhM7iCzdngrpPF5QcXXOA==","shasum":"53b20ba226b848aa6f3bfa3cba18b784ff70125b","tarball":"https://registry.npmjs.org/@danifoldi/markdown-it-imsize/-/markdown-it-imsize-3.0.0.tgz","fileCount":39,"unpackedSize":586609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexle8CRA9TVsSAnZWagAAFqAP/jvhVYwXkuA/4cdhzrBb\ni3HxKDaEKw5GmUq2mA0GYmNZDtomPxlrFkanJeE2fuLWsh3hlEjZFGVLiaDp\nJDHlUn72RftMiYDeFhAUjHkOfxio4RlyDdqRcWlXug7CXSQ+cF34GReaB1Au\njF8TlYS3zmZI9Mqg0N+Lwjo5Ht/pjO0wHnJF5pcQCgGEFjfG+FU8pvF5eTvE\nxR860WC5vmSIXnRKHgWG1rzQlRLeMi+m04evGHZpRCNQDsF8R6xL9salslF4\nKuM7OD+fyU553qehOhvG6+Ct8nsskyKRu5LWlmi3BvsJH2c0Axi6no4jSyDI\n6fVLyZmvmzmwd6ROV/76/O378G2lDkGaNWKaGhNX5/ZMOT/Sc7xcKVCORaZZ\n/dJ6plErqkqoVVxtW8DHRpHyk9LMgU9og85RzYom82reTPbwgn+EqeK5UiP0\nEgV7Kh51ruFADmZos456l6vEWFz56daQxJRu6pqz6KLto/2zly5fJ0Onqg3f\nytlETJ2UIneJQ87BuKwrZaT/eAUfqa1qVqdGtLDlmxRl+DAXG6QN8X7BJTVw\nyGQPFf+3RydAZs3jtfES/ROR9kOszXw7Jvr+lJOPCJjeQkqk3N7IQps8lqkw\nQJ1ybPm6gjSHlqwDnSh/lrHg+XW/RbJbaZ24jdht1FsJwzOqxVCPqYIsR7rE\nzcSJ\r\n=hGLC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAujHNICSxw52Y7NwzJewxLnAEfMd7+tmYykYQfiWyyHAiEAxhm8mMn03XbARshCWjFcE80EXPJAxraOW3e++JuOWlI="}]},"maintainers":[{"name":"danifoldi","email":"dani@stefan.hu"}],"_npmUser":{"name":"danifoldi","email":"dani@stefan.hu"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/markdown-it-imsize_3.0.0_1590056892517_0.5211735394833499"},"_hasShrinkwrap":false}},"time":{"created":"2020-05-21T10:28:12.483Z","3.0.0":"2020-05-21T10:28:12.664Z","modified":"2022-04-05T02:41:41.045Z"},"maintainers":[{"name":"danifoldi","email":"dani@stefan.hu"}],"description":"Markdown-it plugin to specify image size","homepage":"https://github.com/tatsy/markdown-it-imsize","keywords":["markdown-it","markdown-it-plugin"],"repository":{"type":"git","url":"git+https://github.com/tatsy/markdown-it-imsize.git"},"author":{"name":"tatsy"},"bugs":{"url":"https://github.com/tatsy/markdown-it-imsize/issues"},"license":"MIT","readme":"# markdown-it-imsize\n\n[![Build Status](https://travis-ci.org/tatsy/markdown-it-imsize.svg?branch=master)](https://travis-ci.org/tatsy/markdown-it-imsize)\n[![NPM version](https://img.shields.io/npm/v/markdown-it-imsize.svg?style=flat)](https://www.npmjs.org/package/markdown-it-imsize)\n[![Coverage Status](https://coveralls.io/repos/tatsy/markdown-it-imsize/badge.svg)](https://coveralls.io/r/tatsy/markdown-it-imsize)\n[![Dependency Status](https://david-dm.org/tatsy/markdown-it-imsize.svg)](https://david-dm.org/tatsy/markdown-it-imsize)\n[![devDependency Status](https://david-dm.org/tatsy/markdown-it-imsize/dev-status.svg)](https://david-dm.org/tatsy/markdown-it-imsize#info=devDependencies)\n\n> A markdown-it plugin for size-specified image markups. This plugin overloads original image renderer of markdown-it.\n\n## Usage\n\n#### Enable plugin\n\n```js\nvar md = require('markdown-it')({\n  html: true,\n  linkify: true,\n  typography: true\n}).use(require('markdown-it-imsize')); // <-- this use(package_name) is required\n```\n\n#### Example\n\n```md\n![test](image.png =100x200)\n```\n\nis interpreted as\n\n```html\n<p><img src=\"image.png\" alt=\"test\" width=\"100\" height=\"200\"></p>\n```\n\n## Options\n\n#### Auto fill\n\n```js\nvar md = require('markdown-it')({\n  html: true,\n  linkify: true,\n  typography: true\n}).use(require('markdown-it-imsize'), { autofill: true });\n```\n\nwill fill the width and height fields automatically if the specified image path is valid.\n\nTherefore,\n\n```md\n![test](image.png)\n```\n\nis interpreted as\n\n```html\n<p><img src=\"image.png\" alt=\"test\" width=\"200\" height=\"200\"></p>\n```\n\nwhere ```image.png``` is a valid path and its size is 200 x 200.\n\n## Use with RequireJS\n\n```markdown-it-imsize``` is available with bower and RequireJS. First, you can install the package with,\n\n```shell\nbower install markdown-it-imsize\n```\n\nScript for using ```markdown-it-imsize``` with RequireJS is like,\n\n```js\nrequire(['require', 'MarkdownIt', 'MarkdownItImsize'], function(require) {\n  var md = require('MarkdownIt')({\n    html: true,\n    linkify: true,\n    typography: true\n  }).use(require('MarkdownItImsize'));\n\n  var rendered = md.render(\"![test](test.jpg =100x)\");\n  document.getElementById('image-box').innerHTML = rendered;\n});\n```\n","readmeFilename":"README.md"}