{"_id":"@bogdan-dybo/wysiwyg","name":"@bogdan-dybo/wysiwyg","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bogdan-dybo/wysiwyg","version":"1.0.0","description":"Lightweight WYSIWYG editor — zero dependencies, Vue 3 component included","author":{"name":"Bogdan","email":"mortecibogdan@gmail.com"},"license":"MIT","keywords":["wysiwyg","editor","rich-text","vue","vue3","inertia","tailwind"],"repository":{"type":"git","url":"git+https://github.com/bogdan-dybo/wysiwyg.git"},"homepage":"https://github.com/bogdan-dybo/wysiwyg#readme","bugs":{"url":"https://github.com/bogdan-dybo/wysiwyg/issues"},"type":"module","main":"./dist/wysiwyg.umd.js","module":"./dist/wysiwyg.esm.js","types":"./dist/wysiwyg.d.ts","exports":{".":{"import":"./dist/wysiwyg.esm.js","require":"./dist/wysiwyg.umd.js","types":"./dist/wysiwyg.d.ts"},"./vue":{"import":"./dist/WysiwygEditor.vue","types":"./dist/WysiwygEditor.vue.d.ts"},"./css":"./dist/wysiwyg.css"},"sideEffects":["*.css"],"peerDependencies":{"vue":"^3.0.0"},"peerDependenciesMeta":{"vue":{"optional":true}},"devDependencies":{"@vitejs/plugin-vue":"^5.0.0","vite":"^5.0.0","vue":"^3.4.0"},"scripts":{"build":"vite build","postbuild":"cp src/wysiwyg.css dist/wysiwyg.css","prepare":"npm run build","pub":"npm run build && npm publish --access public"},"_id":"@bogdan-dybo/wysiwyg@1.0.0","gitHead":"4f29b4a554c80221c93e060fab9270f62ba622f9","_nodeVersion":"23.6.1","_npmVersion":"11.0.0","dist":{"integrity":"sha512-0fJ5D7FMXMGMGU3rq4RgvRyNKBoGKD5+nD7ty7JQY4wYym7c+ms5UkfuuAV0sKWVzdPt7+HzgEKObmTj+hi8eg==","shasum":"be487ba8da354a49e9f576d920f4172d35457a74","tarball":"https://registry.npmjs.org/@bogdan-dybo/wysiwyg/-/wysiwyg-1.0.0.tgz","fileCount":5,"unpackedSize":58035,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF2Ko4sP5dp6AEk3UfkU4ak/Pxy1AazczwpIpHlZQpFgAiEApokAeZYVMSu731MlctTUyV8QmnbPQKWpFpkbGf60nZY="}]},"_npmUser":{"name":"bogdan-dybo","email":"office@dybo.ro"},"directories":{},"maintainers":[{"name":"bogdan-dybo","email":"office@dybo.ro"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wysiwyg_1.0.0_1779830102316_0.9105904430268015"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-26T21:15:02.208Z","1.0.0":"2026-05-26T21:15:02.454Z","modified":"2026-05-26T21:15:02.686Z"},"maintainers":[{"name":"bogdan-dybo","email":"office@dybo.ro"}],"description":"Lightweight WYSIWYG editor — zero dependencies, Vue 3 component included","homepage":"https://github.com/bogdan-dybo/wysiwyg#readme","keywords":["wysiwyg","editor","rich-text","vue","vue3","inertia","tailwind"],"repository":{"type":"git","url":"git+https://github.com/bogdan-dybo/wysiwyg.git"},"author":{"name":"Bogdan","email":"mortecibogdan@gmail.com"},"bugs":{"url":"https://github.com/bogdan-dybo/wysiwyg/issues"},"license":"MIT","readme":"# @bogdan-dybo/wysiwyg\n\nLightweight WYSIWYG editor — zero dependencies, Vue 3 component included.\n\n## Install\n\n```bash\n# from npm\nnpm i @bogdan-dybo/wysiwyg\n\n# directly from GitHub\nnpm i dybo/wysiwyg\n```\n\n## Setup\n\nImport the CSS once in your app entry (e.g. `app.js` / `bootstrap.js`):\n\n```js\nimport '@bogdan-dybo/wysiwyg/css'\n```\n\n---\n\n## Usage — Vue 3 / Inertia\n\n```vue\n<script setup>\nimport { WysiwygEditor } from '@bogdan-dybo/wysiwyg'\nimport { useForm } from '@inertiajs/vue3'\n\nconst form = useForm({ content: '' })\n</script>\n\n<template>\n  <form @submit.prevent=\"form.post('/articles')\">\n    <WysiwygEditor v-model=\"form.content\" :height=\"450\" />\n    <button type=\"submit\">Save</button>\n  </form>\n</template>\n```\n\n### Props\n\n| Prop          | Type      | Default            | Description                         |\n|---------------|-----------|--------------------|-------------------------------------|\n| `modelValue`  | `string`  | `''`               | HTML content (v-model)              |\n| `height`      | `number`  | `400`              | Minimum editor height in px         |\n| `placeholder` | `string`  | `'Start typing...'`| Placeholder when empty              |\n| `disabled`    | `boolean` | `false`            | Disables editing                    |\n\n### Emits\n\n| Event                | Payload  | Description                    |\n|----------------------|----------|--------------------------------|\n| `update:modelValue`  | `string` | Fired on every change (v-model)|\n| `change`             | `string` | Same, for explicit listening   |\n| `focus`              | —        | Editor focused                 |\n| `blur`               | —        | Editor blurred                 |\n\n### Template ref API\n\n```vue\n<WysiwygEditor ref=\"editorRef\" v-model=\"content\" />\n\n<script setup>\nconst editorRef = ref(null)\n\neditorRef.value.focus()\neditorRef.value.clear()\neditorRef.value.getHTML()  // → string\neditorRef.value.getText()  // → string (no HTML)\neditorRef.value.setHTML('<p>Hello</p>')\n</script>\n```\n\n---\n\n## Usage — Vanilla JS\n\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@bogdan-dybo/wysiwyg/dist/wysiwyg.css\" />\n<div id=\"editor\"></div>\n<script src=\"node_modules/@bogdan-dybo/wysiwyg/dist/wysiwyg.umd.js\"></script>\n\n<script>\n  const editor = new DyboWysiwyg.WysiwygEditorCore('#editor', {\n    height: 400,\n    placeholder: 'Start typing...',\n    onChange: (html) => console.log(html),\n  })\n\n  editor.getHTML()           // → string\n  editor.setHTML('<p>Hi</p>')\n  editor.getText()           // → plain text\n  editor.focus()\n  editor.clear()\n  editor.destroy()\n\n  // Event API\n  editor.on('change', (html) => saveToServer(html))\n</script>\n```\n\n---\n\n## Toolbar features\n\n| Feature             | Notes                                      |\n|---------------------|--------------------------------------------|\n| Undo / Redo         | Native browser history                     |\n| Headings            | Normal, H1, H2, H3 — dropdown with preview|\n| Bold / Italic / Underline / Strikethrough | Ctrl+B / I / U   |\n| Text color          | 32-color palette + custom color picker     |\n| Alignment           | Left, Center, Right, Justify               |\n| Lists               | Bullet and ordered, nested                 |\n| Tables              | Grid picker (up to 8×8), Tab navigation    |\n| Remove formatting   | Clears all inline styles                   |\n| View Source         | Toggle raw HTML editing                    |\n\n---\n\n## License\n\nMIT © Bogdan\n","readmeFilename":"README.md","_rev":"1-9d20f4d87a040da931aea41a25ed9c95"}