{"_id":"@acaronlex/rich-editor","_rev":"2-24907b7806f8fc35ac5402c24942a882","name":"@acaronlex/rich-editor","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@acaronlex/rich-editor","version":"1.0.0","keywords":["editor","wysiwyg","rich-text","contenteditable"],"license":"MIT","_id":"@acaronlex/rich-editor@1.0.0","maintainers":[{"name":"acaronlex","email":"acaronlex@outlook.com"}],"homepage":"https://github.com/acaronlex/rich-editor#readme","bugs":{"url":"https://github.com/acaronlex/rich-editor/issues"},"dist":{"shasum":"52cd6e542f6f986ce191ee391a1877b29849e8e1","tarball":"https://registry.npmjs.org/@acaronlex/rich-editor/-/rich-editor-1.0.0.tgz","fileCount":24,"integrity":"sha512-jQxFglINlNNR3X7H+RwNHM8IBKHudVDu5Ew+gcXAs7pAdu0DpKjzXoakPY2nlPZ9mUQYG9nDuCshQy8t+sxobw==","signatures":[{"sig":"MEUCIQCyrvJN9HZx3JZAhu9J03kPteg/XsRVqKy3gfXDwmyvKAIgXlp9SKUcJ8+GXzBjqhs3EMNmbJdbNgaTshS9b0+0C/k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":149304},"main":"dist/rich-editor.umd.js","gitHead":"9cc8e6468ef07a9bfe87c0948c5aa344e0881b88","scripts":{"dev":"node esbuild.config.mjs --watch","build":"node esbuild.config.mjs"},"_npmUser":{"name":"acaronlex","email":"acaronlex@outlook.com"},"repository":{"url":"git+https://github.com/acaronlex/rich-editor.git","type":"git"},"_npmVersion":"10.8.2","description":"A lightweight WYSIWYG rich text editor","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.20.0","typescript":"^5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/rich-editor_1.0.0_1773167401350_0.09676510582579745","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@acaronlex/rich-editor","version":"1.0.1","description":"A lightweight WYSIWYG rich text editor","main":"dist/rich-editor.umd.js","scripts":{"build":"node esbuild.config.mjs","dev":"node esbuild.config.mjs --watch"},"devDependencies":{"esbuild":"^0.20.0","typescript":"^5.3.0"},"license":"MIT","keywords":["editor","wysiwyg","rich-text","contenteditable"],"repository":{"type":"git","url":"git+https://github.com/acaronlex/rich-editor.git"},"_id":"@acaronlex/rich-editor@1.0.1","gitHead":"88428f1c94fd571cceefbc14b97ddd04cab5dbec","bugs":{"url":"https://github.com/acaronlex/rich-editor/issues"},"homepage":"https://github.com/acaronlex/rich-editor#readme","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Am4YiWO8tiNIoyNntNNorGAhLefsrMTS+4NnK/l5a+5BFnhW4fyhhpz+qq3iYIUNLDOsGogx3+FH+Gak7HTvAw==","shasum":"e759103396d87cce4307fa18637c0adbc0971b06","tarball":"https://registry.npmjs.org/@acaronlex/rich-editor/-/rich-editor-1.0.1.tgz","fileCount":24,"unpackedSize":149326,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC864TPDQEmF6u1sw4msAN20558s1+obUQxea5L+HW1xAiAEe39/LwBfj5xi//Oty+YdTUDm6o36XBrPEaE4A3eN8Q=="}]},"_npmUser":{"name":"acaronlex","email":"acaronlex@outlook.com"},"directories":{},"maintainers":[{"name":"acaronlex","email":"acaronlex@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rich-editor_1.0.1_1773167624050_0.22587289428793467"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-10T18:30:01.240Z","modified":"2026-03-10T18:33:44.337Z","1.0.0":"2026-03-10T18:30:01.485Z","1.0.1":"2026-03-10T18:33:44.208Z"},"bugs":{"url":"https://github.com/acaronlex/rich-editor/issues"},"license":"MIT","homepage":"https://github.com/acaronlex/rich-editor#readme","keywords":["editor","wysiwyg","rich-text","contenteditable"],"repository":{"type":"git","url":"git+https://github.com/acaronlex/rich-editor.git"},"description":"A lightweight WYSIWYG rich text editor","maintainers":[{"name":"acaronlex","email":"acaronlex@outlook.com"}],"readme":"# rich-editor\r\n\r\nA lightweight WYSIWYG rich text editor with zero dependencies.\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install @acaronlex/rich-editor\r\n```\r\n\r\nOr use via CDN:\r\n\r\n```html\r\n<script src=\"https://unpkg.com/@acaronlex/rich-editor/dist/rich-editor.umd.js\"></script>\r\n```\r\n\r\n## Usage\r\n\r\n```html\r\n<textarea id=\"editor\">Hello <b>world</b></textarea>\r\n\r\n<script>\r\n  RichEditor.init({\r\n    selector: '#editor',\r\n    height: 300,\r\n  });\r\n</script>\r\n```\r\n\r\n## Configuration\r\n\r\n| Option | Type | Default | Description |\r\n|--------|------|---------|-------------|\r\n| `selector` | `string` | (required) | CSS selector for textarea(s) to replace |\r\n| `height` | `number` | `200` | Minimum height of the editing area in pixels |\r\n| `toolbar` | `string` | see below | Pipe-separated groups of space-separated button names |\r\n| `file_picker_callback` | `function` | `undefined` | Custom file picker for image uploads |\r\n| `content_css` | `string[]` | `[]` | Additional CSS files to load |\r\n| `relative_urls` | `boolean` | `undefined` | Use relative URLs for links |\r\n| `plugins` | `string[]` | `[]` | Reserved for future plugin system |\r\n\r\n**Default toolbar:**\r\n```\r\nundo redo | formatselect | bold italic underline strikethrough | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | link image table | code fullscreen\r\n```\r\n\r\n## API\r\n\r\n```js\r\n// Initialize editor(s)\r\nRichEditor.init({ selector: '#editor' });\r\n\r\n// Get an editor instance by textarea id\r\nconst editor = RichEditor.get('editor');\r\n\r\n// Get HTML content\r\nconst html = editor.getContent();\r\n\r\n// Set HTML content\r\neditor.setContent('<p>New content</p>');\r\n\r\n// Sync content back to textarea (called automatically on form submit)\r\nRichEditor.triggerSave();\r\n\r\n// Destroy editor and restore textarea\r\neditor.destroy();\r\n```\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}