{"_id":"@ahmedelazazy/rich-text-from-markdown","_rev":"2-3f2fc60ae5c4f8f4531f3485344be633","name":"@ahmedelazazy/rich-text-from-markdown","dist-tags":{"latest":"15.3.0"},"versions":{"15.7.0":{"name":"@ahmedelazazy/rich-text-from-markdown","version":"15.7.0","description":"convert markdown to rich text","keywords":["rich-text","contentful","markdown"],"author":{"name":"Khaled Garbaya","email":"khaled@contentful.com"},"homepage":"https://github.com/contentful/rich-text#readme","license":"MIT","main":"dist/rich-text-from-markdown.es5.js","directories":{"src":"src","test":"__tests__"},"repository":{"type":"git","url":"git+https://github.com/contentful/rich-text.git"},"publishConfig":{"access":"public"},"scripts":{"prebuild":"rimraf dist","build":"tsc --module commonjs && rollup -c rollup.config.js","start":"tsc && rollup -c rollup.config.js -w","lint":"tslint -t codeFrame '@(src|bin)/*.ts'"},"dependencies":{"@contentful/rich-text-types":"^15.7.0","lodash":"^4.17.11","remark-parse":"^6.0.3","unified":"^7.1.0"},"devDependencies":{"@types/lodash":"^4.14.172","faker":"^4.1.0","jest":"^27.1.0","rimraf":"^2.6.3","rollup":"^1.32.1","rollup-plugin-commonjs":"^9.3.4","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^4.2.4","rollup-plugin-sourcemaps":"^0.6.3","rollup-plugin-typescript2":"^0.30.0","ts-jest":"^27.0.5","tslib":"^2.3.1","tslint":"^6.1.3","typescript":"^4.4.2"},"bugs":{"url":"https://github.com/contentful/rich-text/issues"},"gitHead":"f1e1e5792731ffd4800e9c7136425d4306d8ef87","_id":"@ahmedelazazy/rich-text-from-markdown@15.7.0","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-U0DQqRhuIZYND3zq2NXQZXKgIqEqqu0WOZ2tQ235YkL13O9YTo87F6Q85/7h4VQe3b9IhIUZc20t9pHkmp5W8A==","shasum":"1f64f767bc86148f835e5680272634835bf3ddbd","tarball":"https://registry.npmjs.org/@ahmedelazazy/rich-text-from-markdown/-/rich-text-from-markdown-15.7.0.tgz","fileCount":23,"unpackedSize":2148499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpLA5CRA9TVsSAnZWagAAUnQP/RrYN4UxOBYHY78MJIPr\nF3jOQBad8F92rCQr/fa4nEsVabtFoalT5pKBlak8dzYdkMHkHde/cuaZ7cri\nVQw0rsHuOQQnGXxaDqaKlJv062zXppxkYqRJl1UNRE3obNB++dZsMjcvWABR\nJ8rSlDcw2rHMiwBfDt2nHgD5+Z9yyfnXmcaIC0S+dXl5ejWr4qAvTK5oihtu\nO4nbdp3s3/t9FuFsRlgaBcNZh8BEk1D5pg6GeFFTXoYHaDYmlgjUGxUZO5kP\nZIIZg69rGg8guXRBjc3z1CpUCfq5i1+eHAlDI0aogrtPyq84+9APWZ7TNOb3\ny/oSM1o1FMcx7K5HhtvCKDBFRSV9mHl9TeNFRM8N8EOkQSIc4m0yYKdXtPna\ndTvk6U+w3P0Hgs0wJpF+C0ApaKfylUxK2+1DoHQLN0ypOzGWnmbVktZ8uS/7\nMFgyaieIswzeZ//5s7r9RuOwPPze5RWqYJOhgQfqLfnRx853ZKN57uLCrYzn\nMzb3pP7P4PH4aD8DiPA9337fQzwLV/TtpcC/yPZJLhxIBq4eZ4bRGT2XvMUn\nBU882nYgD8Xxqkd19gwyR/U0IShlYfREYiTtDK1bTHu4WD4LYTktVczupSCw\nLbKtBhTkHK7K+cAIFryVCiC6kpREEz2dYFHe2XdVFmj1FaiRovAN1zI6S4G8\nSpeW\r\n=CGLu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRUBYMjvt4I1O96tXybIMx9monpcogUnd2Ru07Yn79IAiEA0a6GBU0BgR/akTdd5oRDXKbYgC/lLhLQ8IKsMn+5IUU="}]},"_npmUser":{"name":"ahmedelazazy","email":"ahmed.elazazy@hotmail.com"},"maintainers":[{"name":"ahmedelazazy","email":"ahmed.elazazy@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rich-text-from-markdown_15.7.0_1638182968707_0.17101613956875394"},"_hasShrinkwrap":false},"15.3.0":{"name":"@ahmedelazazy/rich-text-from-markdown","version":"15.3.0","description":"convert markdown to rich text","keywords":["rich-text","contentful","markdown"],"author":{"name":"Khaled Garbaya","email":"khaled@contentful.com"},"homepage":"https://github.com/contentful/rich-text#readme","license":"MIT","main":"dist/rich-text-from-markdown.es5.js","directories":{"src":"src","test":"__tests__"},"repository":{"type":"git","url":"git+https://github.com/contentful/rich-text.git"},"publishConfig":{"access":"public"},"scripts":{"prebuild":"rimraf dist","build":"tsc --module commonjs && rollup -c rollup.config.js","start":"tsc && rollup -c rollup.config.js -w","lint":"tslint -t codeFrame '@(src|bin)/*.ts'"},"dependencies":{"@contentful/rich-text-types":"^15.3.0","lodash":"^4.17.11","remark-parse":"^6.0.3","unified":"^7.1.0"},"devDependencies":{"@types/lodash":"^4.14.123","faker":"^4.1.0","jest":"^24.7.1","rimraf":"^2.6.3","rollup":"^1.11.0","rollup-plugin-commonjs":"^9.3.4","rollup-plugin-json":"^4.0.0","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-typescript2":"^0.21.0","ts-jest":"^24.0.2","tslint":"^5.16.0","typescript":"^3.4.5"},"bugs":{"url":"https://github.com/contentful/rich-text/issues"},"_id":"@ahmedelazazy/rich-text-from-markdown@15.3.0","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-3UL/nrUTxkXZp2UmMGLhN7T5Ggku1Cdoo/6YxKbrnDkC8TL8GMW9Lf5mZ0keoqPDyK63pE+t/IjknzIoFn70sg==","shasum":"74736fd4cf882403ef8de531e3b796ac88251018","tarball":"https://registry.npmjs.org/@ahmedelazazy/rich-text-from-markdown/-/rich-text-from-markdown-15.3.0.tgz","fileCount":23,"unpackedSize":2118432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpL6CCRA9TVsSAnZWagAAjpYQAJ5wTTU5pRPjqdu4VSyV\njlbi0bF5QuJRsKt+ABzgoSrzOxR9SljAsD3lnNW6HcgFUpu6dpFxqjRg/iVa\n0OM1y56FkS866OpNBNPK0UWUIkxeq58n7q3kpkIzHQOo4alJHlNE8SJPLXh8\nqKZOk3bqjiJpwFEK7oG4LKHZS/xwrTqTkPsO+s/gvRKcj4wTVXg306PweLaL\nsjZnmctNzyiAk4GIEKlh6HEXjYDv3smmhhSOg94TxVe121S+pgKT+CcbvhL8\nZIlGYJcjwVpZE4keGHc7BrXZjb0rfN4F3AVYt8OraSEz+18P6bXpoIpOnwTy\ntrsNJ8lS2CZ6IxjK+RpRhXNfGqPGX+JZb+md4EM7e2DmQMf0fseqBYprUCHn\nwrD8UdaEFxGB0dA8/a45yCDO5bM+mtWYO9kpNiiT5gf18oVHbTyoXOqglXcG\nUFYvaWJcTr/jfO7YIiI6zn0NP3tXl2W+1b04XwxCjHYE9kDM71DXEZdS8wAh\nGhBc+vx777plkJ1PDtzvYsLMbqTvsV9afIGPXftps2uHG8e3rtf3aTR4tCHf\n+plhmScXJas9bfsHaO/Ikn7Kf5oWQENQLOQSJj/k7Ybuj6b3cqRQt3H23XHQ\nEjDZzN9GpnijvfbxOvB2JRVL8Ks/rOtAM9GEcIKAJX3SBeuTfrK77pXKLG8Q\nlBJr\r\n=B6wU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCccY6KFDJsIf/02x8Jq8WAhS2X9uJmRoUcXaw+kCcSRQIhANmEQ8G5a5OL/7ilHIIoAo5UAfVFc/Pc+AEyaKwA+9st"}]},"_npmUser":{"name":"ahmedelazazy","email":"ahmed.elazazy@hotmail.com"},"maintainers":[{"name":"ahmedelazazy","email":"ahmed.elazazy@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rich-text-from-markdown_15.3.0_1638186625948_0.96826853761415"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-29T10:49:28.621Z","15.7.0":"2021-11-29T10:49:29.034Z","modified":"2022-04-04T12:13:28.494Z","15.3.0":"2021-11-29T11:50:26.349Z"},"maintainers":[{"name":"ahmedelazazy","email":"ahmed.elazazy@hotmail.com"}],"description":"convert markdown to rich text","homepage":"https://github.com/contentful/rich-text#readme","keywords":["rich-text","contentful","markdown"],"repository":{"type":"git","url":"git+https://github.com/contentful/rich-text.git"},"author":{"name":"Khaled Garbaya","email":"khaled@contentful.com"},"bugs":{"url":"https://github.com/contentful/rich-text/issues"},"license":"MIT","readme":"# rich-text-from-markdown\n\nA library to convert markdown to Contentful Rich Text document format.\n\n## Installation\n\nUsing [npm](http://npmjs.org/):\n\n```sh\nnpm install @contentful/rich-text-from-markdown\n```\n\nUsing [yarn](https://yarnpkg.com/):\n\n```sh\nyarn add @contentful/rich-text-from-markdown\n```\n\n## Usage\n\n### Basic\n\n```js\nconst { richTextFromMarkdown } = require('@contentful/rich-text-from-markdown');\n\nconst document = await richTextFromMarkdown('# Hello World');\n```\n\n### Advanced\n\nThe library will convert automatically the following markdown nodes:\n\n- `paragraph`\n- `heading`\n- `text`\n- `emphasis`\n- `strong`\n- `delete`\n- `inlineCode`\n- `link`\n- `thematicBreak`\n- `blockquote`\n- `list`\n- `listItem`\n\nIf the markdown content has unsupported nodes like image `![image](url)` you can add a callback as a second argument\nand it will get called everytime an unsupported node is found. The return value of the callback will be the rich text representation\nof that node.\n\n#### Example:\n\n```js\nconst { richTextFromMarkdown } = require('@contentful/rich-text-from-markdown');\n\n// define your own type for unsupported nodes like asset\nconst document = await richTextFromMarkdown(\n  '![image](\\'https://example.com/image.jpg\\')',\n  node => ({\n    nodeType: 'embedded-[entry|asset]-[block|inline]',\n    content: [],\n    data: {\n      target: {\n        sys: {\n          type: 'Link',\n          linkType: 'Entry|Asset',\n          id: '.........'\n        }\n      }\n    }\n  })\n);\n```\n","readmeFilename":"README.md"}