{"_id":"@dojo-ng/rich-text-color","_rev":"2-3e105728cb784eefa08483343b2113ad","name":"@dojo-ng/rich-text-color","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@dojo-ng/rich-text-color","version":"0.1.0","license":"BSD-3-Clause","_id":"@dojo-ng/rich-text-color@0.1.0","maintainers":[{"name":"saysomething","email":"joshs@holmescorp.com"},{"name":"bitranch","email":"bill@bitranch.com"},{"name":"jepe","email":"jeffreyp@holmescorp.com"}],"dist":{"shasum":"d549ae31ee8c813fd01882d7d5ed28ab28bce24f","tarball":"https://registry.npmjs.org/@dojo-ng/rich-text-color/-/rich-text-color-0.1.0.tgz","fileCount":6,"integrity":"sha512-InUtcIwek1EVetnGx61uP4m6BsJK0xThL8O308OZmnSbiApnI9LXNDh5x48QYZZSJjRYstelEbKMiobTNm4I0g==","signatures":[{"sig":"MEQCIAOWDKuADdJahIBEA8XW9qDw3ZZYlpVg3kfM24INNzFEAiAQbIq9d3nhOhpNJzDmjhgnFpgo5bqpOx7OwZdDJs6AeQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14155},"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":"Text/background color plugin for @dojo-ng/rich-text","directories":{},"_nodeVersion":"22.23.1","dependencies":{"lit":"^3.3.0","lexical":"^0.21.0","@dojo-ng/popup":"^0.1.0","@dojo-ng/button":"^0.1.0","@dojo-ng/rich-text":"^0.1.0","@lexical/selection":"^0.21.0","@dojo-ng/color-picker":"^0.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/rich-text-color_0.1.0_1788374434787_0.39103225471931635","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"_id":"@dojo-ng/rich-text-color@0.1.1","dist":{"shasum":"0a7d2eacdb581972c8a1d6a9a7c0a5b5030e0dfc","tarball":"https://registry.npmjs.org/@dojo-ng/rich-text-color/-/rich-text-color-0.1.1.tgz","fileCount":6,"integrity":"sha512-4sD7vS8NJ1ziFsZxLy9Q1mIi+AfN35K4Q32K8QIwkQVBugyMIztxkNFVdaO+I274rHkbgdZS1KeihulkrSJq/A==","signatures":[{"sig":"MEUCIDOuUFsSdPr+ZmVmnlU2W4FeN4WsLrcL5lWJBdUznO7oAiEAktkGs5bqBlEB/oAuhyNWO0IzFKUu9wfyNqDUYCCBVa8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCfPzHamHbgxr+SOhfNdi3uVDrWwUHoYOtAxGosIDopYwIhAOw+/CFiQufEj3rZKqnYnBsiTUaG2cps8cXt8hFe7ldW"}],"unpackedSize":14075},"main":"./dist/index.js","name":"@dojo-ng/rich-text-color","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.1.1","_npmUser":{"name":"bitranch","email":"bill@bitranch.com"},"_npmVersion":"10.9.8","description":"Text/background color 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","@dojo-ng/popup":"^0.1.1","@dojo-ng/button":"^0.1.2","@dojo-ng/rich-text":"^0.1.3","@lexical/selection":"^0.21.0","@dojo-ng/color-picker":"^0.1.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rich-text-color_0.1.1_1791166996390_0.8661860297928101"}}},"time":{"created":"2026-09-02T18:40:34.516Z","modified":"2026-10-05T02:23:16.681Z","0.1.0":"2026-09-02T18:40:34.931Z","0.1.1":"2026-10-05T02:23:16.470Z"},"license":"BSD-3-Clause","description":"Text/background color 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-color\n\nText color and highlight color for `<dj-rich-text>`.\n\nPart of [Dojo NG](../../README.md), a framework-agnostic web component library. BSD-3-Clause.\n\n## Install\n\n```bash\nnpm install @dojo-ng/rich-text-color\n```\n\n## Usage\n\nCompose the color plugins with the default set. `createColorPlugin` customizes the style property, label, or swatches.\n\n```html\n<dj-rich-text id=\"editor\" label=\"Article\"></dj-rich-text>\n<script type=\"module\">\n  import \"@dojo-ng/rich-text\";\n  import { defaultPlugins } from \"@dojo-ng/rich-text\";\n  import { colorPlugin, backgroundColorPlugin } from \"@dojo-ng/rich-text-color\";\n  document.getElementById(\"editor\").plugins = [...defaultPlugins, colorPlugin, backgroundColorPlugin];\n</script>\n```\n\n## Setup\n\n- Exports `colorPlugin` (text color), `backgroundColorPlugin`, and `createColorPlugin({ styleProperty, label, swatches })`.\n- Color is an inline style on the text, so the plugin adds no node types.\n- Setting `plugins` replaces the default set, so spread `...defaultPlugins` to keep bold, italic, underline, undo, and redo.\n\n## Using it\n\n- The toolbar button shows the current color as a swatch. Clicking it opens a `dj-color-picker` and a Remove color button.\n- The picker applies the color live while you drag, without moving focus.\n- The popup closes on a click outside or on Escape, and focus returns to the editor.\n\n## Pasting\n\n- The default paste cleaning removes inline styles, so pasted colored text loses its color.\n- Color is kept through `value`, which is not cleaned. A trusted app can set its own `pasteSanitizer`.\n","readmeFilename":"README.md"}