{"_id":"@elyasasmad/carta-md","_rev":"3-bbbc33a6c9137a4f3c2c72bf58585a43","name":"@elyasasmad/carta-md","description":"A lightweight, fully customizable, Markdown editor","dist-tags":{"latest":"3.0.3"},"versions":{"3.0.0":{"name":"@elyasasmad/carta-md","version":"3.0.0","keywords":["carta","markdown","editor","unified","remark","text editor","marked editor","slash","syntax highlighting","emoji","katex"],"license":"MIT","_id":"@elyasasmad/carta-md@3.0.0","maintainers":[{"name":"elyasasmad","email":"elyasasmadz@gmail.com"}],"homepage":"https://github.com/ElyasAsmad/carta#readme","bugs":{"url":"https://github.com/ElyasAsmad/carta/issues"},"dist":{"shasum":"031186f8b2028d8b96084e83ffd6f24fa389b038","tarball":"https://registry.npmjs.org/@elyasasmad/carta-md/-/carta-md-3.0.0.tgz","fileCount":2,"integrity":"sha512-7ElM3CW5GTkvAOSueMfwHiI+MXFwweNr+UcEoCUYaOVs5x57PEIcCSFkXNIIeakKQRRXmjo5cQamX++Y+W8TgA==","signatures":[{"sig":"MEUCIF8c4Vx9lbUaQ5MvOSlK25umjYUiL5XX+/wumQeuoJvKAiEA8HmSxuPNGc328qGpopDR/Qt3xWmKzw/jNogko/j4q7k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9893},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","svelte":"./dist/index.js"},"./default.css":"./dist/default.css"},"gitHead":"90f27cc481f86b4f6b27ab70b7c3172a8d84faf5","scripts":{"dev":"vite dev","build":"svelte-kit sync && svelte-package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"_npmUser":{"name":"elyasasmad","email":"elyasasmadz@gmail.com"},"repository":{"url":"git+https://github.com/ElyasAsmad/carta.git","type":"git"},"_npmVersion":"10.1.0","description":"A lightweight, fully customizable, Markdown editor","directories":{},"_nodeVersion":"20.9.0","dependencies":{"shiki":"^1.4.0","unified":"^11.0.4","remark-gfm":"^4.0.0","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","rehype-stringify":"^10.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.6","tslib":"^2.4.1","typescript":"^5.1.6","svelte-check":"^3.6.7","@sveltejs/kit":"^2.5.4","@sveltejs/package":"^2.3.0","@sveltejs/adapter-auto":"^3.1.1","@sveltejs/vite-plugin-svelte":"^3.0.2"},"peerDependencies":{"svelte":"^3.54.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/carta-md_3.0.0_1718800636723_0.4470143256097634","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@elyasasmad/carta-md","version":"3.0.1","keywords":["carta","markdown","editor","unified","remark","text editor","marked editor","slash","syntax highlighting","emoji","katex"],"license":"MIT","_id":"@elyasasmad/carta-md@3.0.1","maintainers":[{"name":"elyasasmad","email":"elyasasmadz@gmail.com"}],"homepage":"https://github.com/ElyasAsmad/carta#readme","bugs":{"url":"https://github.com/ElyasAsmad/carta/issues"},"dist":{"shasum":"6be20543aeb9eaa1b359d973c81be1e0b2753869","tarball":"https://registry.npmjs.org/@elyasasmad/carta-md/-/carta-md-3.0.1.tgz","fileCount":70,"integrity":"sha512-QgF7HUeTrigvZ4RKacUObIVoY7s+8QSj13gNt1H3LSM2O7bhBct+HoIwOlaQFUqDBuvOjfpZ8OFo9WCz02bQMg==","signatures":[{"sig":"MEUCIQDyPiUlkvDuIlWJLDYr0dndgyoJJHgEpmQ7qooo9IehJQIgJZ658A5/LCysJKniw8Y1qBzkKHh5cgLTN9Qa04Aq+xY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281903},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","svelte":"./dist/index.js"},"./default.css":"./dist/default.css"},"gitHead":"90f27cc481f86b4f6b27ab70b7c3172a8d84faf5","scripts":{"dev":"vite dev","build":"svelte-kit sync && svelte-package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"_npmUser":{"name":"elyasasmad","email":"elyasasmadz@gmail.com"},"repository":{"url":"git+https://github.com/ElyasAsmad/carta.git","type":"git"},"_npmVersion":"10.1.0","description":"A lightweight, fully customizable, Markdown editor","directories":{},"_nodeVersion":"20.9.0","dependencies":{"shiki":"^1.4.0","unified":"^11.0.4","remark-gfm":"^4.0.0","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","rehype-stringify":"^10.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.6","tslib":"^2.4.1","typescript":"^5.1.6","svelte-check":"^3.6.7","@sveltejs/kit":"^2.5.4","@sveltejs/package":"^2.3.0","@sveltejs/adapter-auto":"^3.1.1","@sveltejs/vite-plugin-svelte":"^3.0.2"},"peerDependencies":{"svelte":"^3.54.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/carta-md_3.0.1_1718800862728_0.8360956276950817","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"@elyasasmad/carta-md","version":"3.0.2","keywords":["carta","markdown","editor","unified","remark","text editor","marked editor","slash","syntax highlighting","emoji","katex"],"license":"MIT","_id":"@elyasasmad/carta-md@3.0.2","maintainers":[{"name":"elyasasmad","email":"elyasasmadz@gmail.com"}],"homepage":"https://github.com/ElyasAsmad/carta#readme","bugs":{"url":"https://github.com/ElyasAsmad/carta/issues"},"dist":{"shasum":"f5d81cd71fb4931bbb5b99154a5d3fc960c67b02","tarball":"https://registry.npmjs.org/@elyasasmad/carta-md/-/carta-md-3.0.2.tgz","fileCount":70,"integrity":"sha512-ul1MClKKkH5M4wsltC6mkhwcUMVcSc9UFB4GmUgsX2aKOA3tY/NUtRVxRjap5WYYRf+F8ZANoQa5oYey7zta8A==","signatures":[{"sig":"MEYCIQCDaXu8jp1J8cAXEKGDL7QI/DIFnnCSSxiYQKrdzt8mTgIhAIkMuShCZNmd/YlcbDjUY4rHvALvwPpGRETeaOzXYFbg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281921},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","svelte":"./dist/index.js"},"./default.css":"./dist/default.css"},"gitHead":"90f27cc481f86b4f6b27ab70b7c3172a8d84faf5","scripts":{"dev":"vite dev","build":"svelte-kit sync && svelte-package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"_npmUser":{"name":"elyasasmad","email":"elyasasmadz@gmail.com"},"repository":{"url":"git+https://github.com/ElyasAsmad/carta.git","type":"git"},"_npmVersion":"10.1.0","description":"A lightweight, fully customizable, Markdown editor","directories":{},"_nodeVersion":"20.9.0","dependencies":{"shiki":"^1.4.0","unified":"^11.0.4","remark-gfm":"^4.0.0","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","rehype-stringify":"^10.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.1.6","tslib":"^2.4.1","typescript":"^5.1.6","svelte-check":"^3.6.7","@sveltejs/kit":"^2.5.4","@sveltejs/package":"^2.3.0","@sveltejs/adapter-auto":"^3.1.1","@sveltejs/vite-plugin-svelte":"^3.0.2"},"peerDependencies":{"svelte":"^3.54.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/carta-md_3.0.2_1718801641137_0.8617954078098409","host":"s3://npm-registry-packages"}},"3.0.3":{"name":"@elyasasmad/carta-md","description":"A lightweight, fully customizable, Markdown editor","main":"./dist/index.js","types":"./dist/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/ElyasAsmad/carta.git"},"exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js","import":"./dist/index.js"},"./default.css":"./dist/default.css"},"version":"3.0.3","scripts":{"dev":"vite dev","build":"svelte-kit sync && svelte-package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"},"devDependencies":{"@sveltejs/adapter-auto":"^3.1.1","@sveltejs/kit":"^2.5.4","@sveltejs/package":"^2.3.0","@sveltejs/vite-plugin-svelte":"^3.0.2","svelte-check":"^3.6.7","tslib":"^2.4.1","typescript":"^5.1.6","vite":"^5.1.6"},"type":"module","dependencies":{"github-markdown-css":"^5.6.1","rehype-stringify":"^10.0.0","remark-gfm":"^4.0.0","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","shiki":"^1.4.0","unified":"^11.0.4"},"peerDependencies":{"svelte":"^3.54.0 || ^4.0.0"},"keywords":["carta","markdown","editor","unified","remark","text editor","marked editor","slash","syntax highlighting","emoji","katex"],"_id":"@elyasasmad/carta-md@3.0.3","gitHead":"90f27cc481f86b4f6b27ab70b7c3172a8d84faf5","bugs":{"url":"https://github.com/ElyasAsmad/carta/issues"},"homepage":"https://github.com/ElyasAsmad/carta#readme","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-aLMYqSHgHJy+DH6Xy9L5YMOxLKWwjs4VTo6+IIze84+6pcsgXahsVjyKgGE6mwboz/DdNdNg6Sg6+g7nwsW0eA==","shasum":"8ae69094cffc459b5ec9ccb9f5558580c1b3aeb9","tarball":"https://registry.npmjs.org/@elyasasmad/carta-md/-/carta-md-3.0.3.tgz","fileCount":70,"unpackedSize":281986,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGBb0W4Vstcig/UpktJ1201bZHWmrT9hxOqCoqzuoYAOAiEAmUgZbAhgRYWcTXTnNR4Tdmyg7SaXtYQv3Wprq8i7OLM="}]},"_npmUser":{"name":"elyasasmad","email":"elyasasmadz@gmail.com"},"directories":{},"maintainers":[{"name":"elyasasmad","email":"elyasasmadz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/carta-md_3.0.3_1718805934539_0.14780271765259423"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-19T12:37:16.620Z","modified":"2024-06-19T14:05:34.891Z","3.0.0":"2024-06-19T12:37:16.862Z","3.0.1":"2024-06-19T12:41:02.948Z","3.0.2":"2024-06-19T12:54:01.349Z","3.0.3":"2024-06-19T14:05:34.721Z"},"maintainers":[{"name":"elyasasmad","email":"elyasasmadz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/ElyasAsmad/carta.git"},"keywords":["carta","markdown","editor","unified","remark","text editor","marked editor","slash","syntax highlighting","emoji","katex"],"license":"MIT","homepage":"https://github.com/ElyasAsmad/carta#readme","bugs":{"url":"https://github.com/ElyasAsmad/carta/issues"},"readme":"<div align=\"right\">\r\n\t<a href=\"https://www.npmjs.com/package/carta-md\">\r\n\t\t<img src=\"https://img.shields.io/npm/v/carta-md?color=ff7cc6&labelColor=171d27&logo=npm&logoColor=white\" alt=\"npm\">\r\n\t</a>\r\n\t<a href=\"https://ko-fi.com/beartocode\">\r\n\t\t<img src=\"https://img.shields.io/badge/Ko--fi-FF5E5B?logo=ko-fi&logoColor=white&color=4dacfa&labelColor=171d27&label=Donate\" alt=\"bundle\">\r\n\t</a>\r\n\t<a href=\"https://github.com/BearToCode/carta/blob/master/LICENSE\">\r\n\t\t<img src=\"https://img.shields.io/npm/l/carta-md?color=71d58a&labelColor=171d27&logo=git&logoColor=white\" alt=\"license\">\r\n\t</a>\r\n\t<a href=\"http://beartocode.github.io/carta/\">\r\n\t\t<img src=\"https://img.shields.io/readthedocs/carta?logo=svelte&color=b581fd&logoColor=ffffff&labelColor=171d27\" alt=\"docs\">\r\n\t</a>\r\n</div>\r\n\r\n[![Carta.png](https://i.postimg.cc/nV6DMXKM/Carta.png)](https://beartocode.github.io/carta/)\r\n\r\n<h1 align=\"center\"><strong>Carta</strong></h1>\r\n<div align=\"center\">Modern, lightweight, powerful Markdown Editor.</div>\r\n<br />\r\n<div align=\"center\">\r\n<a href=\"https://beartocode.github.io/carta/\">📚 Documentation</a> \r\n<span> · </span>\r\n<a href=\"https://github.com/BearToCode/carta\">GitHub</a> \r\n</div>\r\n\r\n<br>\r\n\r\n# Introduction\r\n\r\n> **NOTE**:\r\n> Carta has recently been updated to `v4`, which features numerous major changes.\r\n>\r\n> Follow the [Migration Guide](http://beartocode.github.io/carta/migration) to update your project.\r\n\r\nCarta is a **lightweight**, **fast** and **extensible** Svelte Markdown editor and viewer. It is powered by [unified](https://github.com/unifiedjs/unified), [remark](https://github.com/remarkjs/remark) and [rehype](https://github.com/rehypejs/rehype). Check out the [examples](http://beartocode.github.io/carta/examples) to see it in action.\r\nDifferently from most editors, Carta does not include a code editor, but it is _just_ a textarea with syntax highlighting, shortcuts and more.\r\n\r\n## Features\r\n\r\n- 🌈 Markdown syntax highlighting ([Shiki](https://shiki.style/));\r\n- 🛠️ Toolbar (extensible);\r\n- ⌨️ Keyboard **shortcuts** (extensible);\r\n- 📦 Supports **[150+ plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins)** thanks to remark;\r\n- 🔀 Scroll sync;\r\n- ✅ Accessibility friendly;\r\n- 🖥️ **SSR** compatible;\r\n- ⚗️ **KaTeX** support (plugin);\r\n- 🔨 **Slash** commands (plugin);\r\n- 😄 **Emojis**, with included search (plugin);\r\n- ✏️ **TikZ** support (plugin);\r\n- 📂 **Attachment** support (plugin);\r\n- ⚓ **Anchor** links in headings (plugin);\r\n- 🌈 Code blocks **syntax highlighting** (plugin).\r\n\r\n## Packages\r\n\r\n| Package                                                                       | Status                                                                        | Docs                                                                         |\r\n| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |\r\n| [carta-md](https://www.npmjs.com/package/carta-md)                            | ![carta-md](https://img.shields.io/npm/v/carta-md)                            | [/](https://beartocode.github.io/carta/introduction)                         |\r\n| [plugin-math](https://www.npmjs.com/package/@cartamd/plugin-math)             | ![plugin-math](https://img.shields.io/npm/v/@cartamd/plugin-math)             | [/plugins/math](https://beartocode.github.io/carta/plugins/math)             |\r\n| [plugin-code](https://www.npmjs.com/package/@cartamd/plugin-code)             | ![plugin-code](https://img.shields.io/npm/v/@cartamd/plugin-code)             | [/plugins/code](https://beartocode.github.io/carta/plugins/code)             |\r\n| [plugin-emoji](https://www.npmjs.com/package/@cartamd/plugin-emoji)           | ![plugin-emoji](https://img.shields.io/npm/v/@cartamd/plugin-emoji)           | [/plugins/emoji](https://beartocode.github.io/carta/plugins/emoji)           |\r\n| [plugin-slash](https://www.npmjs.com/package/@cartamd/plugin-slash)           | ![plugin-slash](https://img.shields.io/npm/v/@cartamd/plugin-slash)           | [/plugins/slash](https://beartocode.github.io/carta/plugins/slash)           |\r\n| [plugin-tikz](https://www.npmjs.com/package/@cartamd/plugin-tikz)             | ![plugin-tikz](https://img.shields.io/npm/v/@cartamd/plugin-tikz)             | [/plugins/tikz](https://beartocode.github.io/carta/plugins/tikz)             |\r\n| [plugin-attachment](https://www.npmjs.com/package/@cartamd/plugin-attachment) | ![plugin-attachment](https://img.shields.io/npm/v/@cartamd/plugin-attachment) | [/plugins/attachment](https://beartocode.github.io/carta/plugins/attachment) |\r\n| [plugin-anchor](https://www.npmjs.com/package/@cartamd/plugin-anchor)         | ![plugin-anchor](https://img.shields.io/npm/v/@cartamd/plugin-anchor)         | [/plugins/anchor](https://beartocode.github.io/carta/plugins/anchor)         |\r\n\r\n## Community plugins\r\n\r\n| Plugin                                                                        | Description                        |\r\n| ----------------------------------------------------------------------------- | ---------------------------------- |\r\n| [carta-plugin-video](https://github.com/maisonsmd/carta-plugin-video)         | Render online videos               |\r\n| [carta-plugin-imsize](https://github.com/maisonsmd/carta-plugin-imsize)       | Render images in specific sizes    |\r\n| [carta-plugin-subscript](https://github.com/maisonsmd/carta-plugin-subscript) | Render subscripts and superscripts |\r\n| [carta-plugin-ins-del](https://github.com/maisonsmd/carta-plugin-ins-del)     | `<ins>` and `<del>` tags support   |\r\n\r\n# Getting started\r\n\r\n> **WARNING**\r\n> Sanitization is not dealt with by Carta. You need to provide a `sanitizer` in the options.\r\n> Common sanitizers are [isomorphic-dompurify](https://www.npmjs.com/package/isomorphic-dompurify) (suggested) and [sanitize-html](https://www.npmjs.com/package/sanitize-html).\r\n> Checkout the documentation for an example.\r\n\r\n## Installation\r\n\r\nCore package:\r\n\r\n```\r\nnpm i carta-md\r\n```\r\n\r\nPlugins:\r\n\r\n```\r\nnpm i @cartamd/plugin-name\r\n```\r\n\r\n## Basic configuration\r\n\r\n```svelte\r\n<script lang=\"ts\">\r\n\timport { Carta, MarkdownEditor } from 'carta-md';\r\n\t// Component default theme\r\n\timport 'carta-md/default.css';\r\n\r\n\tconst carta = new Carta({\r\n\t\t// Remember to use a sanitizer to prevent XSS attacks\r\n\t\t// sanitizer: mySanitizer\r\n\t});\r\n</script>\r\n\r\n<MarkdownEditor {carta} />\r\n\r\n<style>\r\n\t/* Or in global stylesheet */\r\n\t/* Set your custom monospace font */\r\n\t:global(.carta-font-code) {\r\n\t\tfont-family: '...', monospace;\r\n\t\tfont-size: 1.1rem;\r\n\t}\r\n</style>\r\n```\r\n\r\n# Documentation\r\n\r\nFor the full documentation, examples, guides and more checkout the [website](https://beartocode.github.io/carta/).\r\n\r\n- [Introduction](https://beartocode.github.io/carta/introduction)\r\n- [Examples](https://beartocode.github.io/carta/examples)\r\n- [Getting Started](https://beartocode.github.io/carta/getting-started)\r\n- [Editing Styles](https://beartocode.github.io/carta/editing-styles)\r\n- Plugins:\r\n  - [Math](https://beartocode.github.io/carta/plugins/math)\r\n  - [Code](https://beartocode.github.io/carta/plugins/code)\r\n  - [Emoji](https://beartocode.github.io/carta/plugins/emoji)\r\n  - [Slash](https://beartocode.github.io/carta/plugins/slash)\r\n  - [TikZ](https://beartocode.github.io/carta/plugins/tikz)\r\n  - [Attachment](https://beartocode.github.io/carta/plugins/attachment)\r\n  - [Anchor](https://beartocode.github.io/carta/plugins/anchor)\r\n- API:\r\n  - [Utilities](https://beartocode.github.io/carta/api/utilities)\r\n  - [Core](https://beartocode.github.io/carta/api/core)\r\n  - [Extension](https://beartocode.github.io/carta/api/extension)\r\n\r\n# Contributing & Development\r\n\r\nEvery contribution is well accepted. If you have a feature request you can open a new issue.\r\n\r\nThis package uses a [pnpm workspace](https://pnpm.io/workspaces), so pnpm is required to download and put everything together properly.\r\n\r\n### Committing\r\n\r\nThis repository is [commitizen](https://github.com/commitizen/cz-cli) friendly. To commit use:\r\n\r\n```\r\nnpm run commit\r\n# or, if you have commitizen installed globally\r\ngit cz\r\n```\r\n\r\n### Running docs\r\n\r\nIf you want to preview the docs:\r\n\r\n```\r\ncd docs\r\nnpm run dev\r\n```\r\n","readmeFilename":"README.md"}