{"_id":"@dojo-ng/rich-text-markdown","_rev":"2-e3b989d8dffc64fae4cad56cb1751686","name":"@dojo-ng/rich-text-markdown","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@dojo-ng/rich-text-markdown","version":"0.1.0","license":"BSD-3-Clause","_id":"@dojo-ng/rich-text-markdown@0.1.0","maintainers":[{"name":"saysomething","email":"joshs@holmescorp.com"},{"name":"bitranch","email":"bill@bitranch.com"},{"name":"jepe","email":"jeffreyp@holmescorp.com"}],"dist":{"shasum":"e6f140c2d9491d47f255b52778985a8cd7abf3e7","tarball":"https://registry.npmjs.org/@dojo-ng/rich-text-markdown/-/rich-text-markdown-0.1.0.tgz","fileCount":6,"integrity":"sha512-nG+GJTxKk3HDbRPC04+o1oaD/BxDDbUgzYHzURX83aR1VdfDGZ1vbBFkEaUKuL6PlCiDq6u5SIChbi8BuoRc7Q==","signatures":[{"sig":"MEYCIQD5USQAK1CLS8/C9sVkbYJgSqkBzBwCAYaxcBzX/IoKGgIhAOs38h2X1Fcye3xhC4yoD6x0tpKSmAf6QpDxzhATzHd8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6860},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","scripts":{"build":"tsc -p tsconfig.json","clean":"rm -rf dist"},"_npmUser":{"name":"bitranch","email":"bill@bitranch.com"},"_npmVersion":"10.9.8","description":"Markdown input/output plugin for @dojo-ng/rich-text","directories":{},"_nodeVersion":"22.23.1","dependencies":{"lit":"^3.3.0","lexical":"^0.21.0","@lexical/markdown":"^0.21.0","@dojo-ng/rich-text":"^0.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rich-text-markdown_0.1.0_1788374436730_0.06415005261400775","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"@dojo-ng/rich-text-markdown@0.2.0","dist":{"shasum":"9af51ba6843d6cbf531182043ab55a04b1829cbc","tarball":"https://registry.npmjs.org/@dojo-ng/rich-text-markdown/-/rich-text-markdown-0.2.0.tgz","fileCount":6,"integrity":"sha512-mWF7R7dmYG1dpZZn4P1SPihTVqIAm39+F3bm5r3TR2NGF9v5iYSP8g7TqFZ67Lp9ZFZ6L6aLwniRot9cNLD9rA==","signatures":[{"sig":"MEYCIQDYtDelb5KOPlKDm71aTppONQ41jfV7WgcsgrBrW0IaUwIhAMb4kZ9Op+o4WVAjAtb43paBH1l+hczoRVGT2rAxshTk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCoEfQ1W1Pya9syIGR6ALQ6DNkg2VhVbTElnA4Ks/W9uwIhAKQXK4AMCqKRzu/UTDLEmw+CKQjdEu8PIXM9dR0kolup"}],"unpackedSize":7670},"main":"./dist/index.js","name":"@dojo-ng/rich-text-markdown","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","license":"BSD-3-Clause","scripts":{"build":"tsc -p tsconfig.json","clean":"rm -rf dist"},"version":"0.2.0","_npmUser":{"name":"bitranch","email":"bill@bitranch.com"},"_npmVersion":"10.9.8","description":"Markdown input/output plugin for @dojo-ng/rich-text","directories":{},"maintainers":[{"name":"saysomething","email":"joshs@holmescorp.com"},{"name":"bitranch","email":"bill@bitranch.com"},{"name":"jepe","email":"jeffreyp@holmescorp.com"}],"_nodeVersion":"22.23.1","dependencies":{"lit":"^3.3.0","lexical":"^0.21.0","@lexical/markdown":"^0.21.0","@dojo-ng/rich-text":"^0.1.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rich-text-markdown_0.2.0_1790864733711_0.19697583024033416"}}},"time":{"created":"2026-09-02T18:40:36.470Z","modified":"2026-10-01T14:25:33.984Z","0.1.0":"2026-09-02T18:40:36.874Z","0.2.0":"2026-10-01T14:25:33.789Z"},"license":"BSD-3-Clause","description":"Markdown input/output plugin for @dojo-ng/rich-text","maintainers":[{"name":"saysomething","email":"joshs@holmescorp.com"},{"name":"bitranch","email":"bill@bitranch.com"},{"name":"jepe","email":"jeffreyp@holmescorp.com"}],"readme":"# @dojo-ng/rich-text-markdown\n\nMarkdown input/output plugin for @dojo-ng/rich-text\n\nPart of [Dojo NG](../../README.md), a framework-agnostic web component library. BSD-3-Clause.\n\n> An opt-in plugin for `@dojo-ng/rich-text` (not a custom element). It contributes no nodes and no toolbar: it adds a `markdown` output format (set `format=\"markdown\"` on `dj-rich-text` and the `value` getter emits Markdown, the setter parses it) and, by default, registers type-a-shortcut behaviour (`# ` for a heading, `- ` for a list, `**bold**`, and so on) even when the output format stays HTML. Setting `plugins` REPLACES the default set, so spread `...defaultPlugins` to keep bold/italic/underline + undo/redo. Markdown coverage follows the node-contributing plugins that are loaded: transformers whose node classes are not registered are dropped, so pair this with `rich-text-headings`, `rich-text-lists`, and `rich-text-links` for headings, lists, and links. Without the headings plugin, `# ` stays literal text. `createMarkdownPlugin({ shortcuts, transformers })` turns shortcuts off or supplies a custom transformer set; `usableTransformers(editor, transformers)` is exported for inspection. Requires the `@lexical/markdown` dependency. Note: pasted Markdown-looking text is not converted; Markdown enters via the `value` property or the shortcuts.\n\n## Install\n\n```bash\nnpm install @dojo-ng/rich-text-markdown\n```\n\n## Usage\n\nCompose the markdown plugin with the default set (plus headings/lists/links for full coverage) and set `format=\"markdown\"` so the value round-trips as Markdown. Typing `# ` still makes a heading.\n\n```html\n<dj-rich-text id=\"editor\" label=\"Article\" format=\"markdown\"></dj-rich-text>\n<script type=\"module\">\n  import \"@dojo-ng/rich-text\";\n  import { defaultPlugins } from \"@dojo-ng/rich-text\";\n  import { headingsPlugin } from \"@dojo-ng/rich-text-headings\";\n  import { listsPlugin } from \"@dojo-ng/rich-text-lists\";\n  import { linksPlugin } from \"@dojo-ng/rich-text-links\";\n  import { markdownPlugin } from \"@dojo-ng/rich-text-markdown\";\n  const el = document.getElementById(\"editor\");\n  el.plugins = [...defaultPlugins, headingsPlugin, listsPlugin, linksPlugin, markdownPlugin];\n  el.value = \"# Title\\n\\nSome **bold** text.\";\n</script>\n```\n","readmeFilename":"README.md"}