{"_id":"@ap666/office-word","_rev":"8-0a706cb922cf84100f596a591c351b3e","name":"@ap666/office-word","dist-tags":{"latest":"0.2.10"},"versions":{"0.1.0":{"name":"@ap666/office-word","version":"0.1.0","keywords":["vue3","tiptap","rich-text-editor","component-library"],"license":"MIT","_id":"@ap666/office-word@0.1.0","maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"dist":{"shasum":"599cf5854148aab861f818abeec9bf796c1d7931","tarball":"https://registry.npmjs.org/@ap666/office-word/-/office-word-0.1.0.tgz","fileCount":47,"integrity":"sha512-mbcRxG+wKxxrpfAMtC1HFVds6JXarmFv5LKm7eyPD/KUY4jAude0GQcSeOLvCoEsDM6xACgkXWxu8mv02Q/Ihg==","signatures":[{"sig":"MEUCIQDUtZhGflWN27Qv+2htidyyJHK7xwFJKehRVI6c2Qot0gIgHUuwkEuww34gK5JcME7j/uHGwb7gXKeemt1DVAF7xd0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6341552},"main":"./dist/index.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"./style.css":"./dist/style.css"},"gitHead":"760841babcfcd22cb289cc293df91af3be46f705","_npmUser":{"name":"cgq001","email":"805696667@qq.com"},"_npmVersion":"10.9.0","description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.12.0","dependencies":{"plyr":"^3.8.4","jspdf":"^4.2.1","katex":"^0.16.44","marked":"^17.0.5","html2canvas":"^1.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.5.0","lowlight":"^3.3.0","@tiptap/core":"^3.22.1","@tiptap/vue-3":"^3.22.1","@tiptap/starter-kit":"^3.22.1","@tiptap/extension-subscript":"^3.22.1","@tiptap/extension-task-item":"^3.22.1","@tiptap/extension-task-list":"^3.22.1","@tiptap/extension-underline":"^3.22.1","@tiptap/extension-code-block":"^3.22.1","@tiptap/extension-text-style":"^3.22.1","@tiptap/extension-font-family":"^3.22.1","@tiptap/extension-placeholder":"^3.22.1","@tiptap/extension-superscript":"^3.22.1","@tiptap/extension-code-block-lowlight":"^3.22.1"},"_npmOperationalInternal":{"tmp":"tmp/office-word_0.1.0_1775353660552_0.025356721391540882","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@ap666/office-word","version":"0.1.1","keywords":["vue3","tiptap","rich-text-editor","component-library"],"license":"MIT","_id":"@ap666/office-word@0.1.1","maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"dist":{"shasum":"e6c04bcb933231a550340f926884335aeb42c216","tarball":"https://registry.npmjs.org/@ap666/office-word/-/office-word-0.1.1.tgz","fileCount":47,"integrity":"sha512-8R1SzWQMmQ1B/iWhC3iWyaxBeI3PnWX+r7OrQK0tZ5/O3NWUFaXUkO9KBsXVjYQwbtn9L5Okd4KOuD5vF56p3Q==","signatures":[{"sig":"MEUCICx+MeVj5rn+5DevNBNgc41t9CGrc3MQLF/wGtLjL+gTAiEA4ULItpzTt+tqPEAUlcJQD7DYBKhjfHNZPxSylugPOqI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5330321},"main":"./dist/index.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"./style.css":"./dist/style.css"},"gitHead":"2051000b4ba67ee3b36cf46c7c6776a3541675f9","_npmUser":{"name":"cgq001","email":"805696667@qq.com"},"_npmVersion":"10.9.0","description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.12.0","dependencies":{"plyr":"^3.8.4","jspdf":"^4.2.1","katex":"^0.16.44","marked":"^17.0.5","html2canvas":"^1.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.5.0","lowlight":"^3.3.0","@tiptap/pm":"^3.22.1","@tiptap/core":"^3.22.1","@tiptap/vue-3":"^3.22.1","@tiptap/starter-kit":"^3.22.1","@tiptap/extension-subscript":"^3.22.1","@tiptap/extension-task-item":"^3.22.1","@tiptap/extension-task-list":"^3.22.1","@tiptap/extension-underline":"^3.22.1","@tiptap/extension-code-block":"^3.22.1","@tiptap/extension-text-style":"^3.22.1","@tiptap/extension-font-family":"^3.22.1","@tiptap/extension-placeholder":"^3.22.1","@tiptap/extension-superscript":"^3.22.1","@tiptap/extension-code-block-lowlight":"^3.22.1"},"_npmOperationalInternal":{"tmp":"tmp/office-word_0.1.1_1775356734718_0.7495856838632313","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@ap666/office-word","version":"0.1.2","keywords":["vue3","tiptap","rich-text-editor","component-library"],"license":"MIT","_id":"@ap666/office-word@0.1.2","maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"dist":{"shasum":"ace92b61c65a70a9ea94552dc1daae61a582d87c","tarball":"https://registry.npmjs.org/@ap666/office-word/-/office-word-0.1.2.tgz","fileCount":47,"integrity":"sha512-qvaA+J34rYMb5ZLFTruFeZdUH4ZGmPOMo6+hCgrgRmOIkCowR972kyWeXli64FENcsmYKB8I24dwrELNNVNA7w==","signatures":[{"sig":"MEYCIQCfDdvwzcBSoQpaFJ0bw++LXb6uFHw+y5jE56nU16RxlAIhANg4m4VTP36kFKEYNRVedlyRlTbTplUSjQw15BMHFToe","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5330505},"main":"./dist/index.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"./style.css":"./dist/style.css"},"gitHead":"b5b125e96ae849e3e0fe9364e0bcf01dfc3cb0c6","_npmUser":{"name":"cgq001","email":"805696667@qq.com"},"_npmVersion":"10.9.0","description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.12.0","dependencies":{"plyr":"^3.8.4","jspdf":"^4.2.1","katex":"^0.16.44","marked":"^17.0.5","html2canvas":"^1.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.5.0","lowlight":"^3.3.0","@tiptap/pm":"^3.22.1","@tiptap/core":"^3.22.1","@tiptap/vue-3":"^3.22.1","@tiptap/starter-kit":"^3.22.1","@tiptap/extension-table":"^3.22.1","@tiptap/extension-subscript":"^3.22.1","@tiptap/extension-table-row":"^3.22.1","@tiptap/extension-task-item":"^3.22.1","@tiptap/extension-task-list":"^3.22.1","@tiptap/extension-underline":"^3.22.1","@tiptap/extension-code-block":"^3.22.1","@tiptap/extension-table-cell":"^3.22.1","@tiptap/extension-text-style":"^3.22.1","@tiptap/extension-font-family":"^3.22.1","@tiptap/extension-placeholder":"^3.22.1","@tiptap/extension-superscript":"^3.22.1","@tiptap/extension-table-header":"^3.22.1","@tiptap/extension-code-block-lowlight":"^3.22.1"},"_npmOperationalInternal":{"tmp":"tmp/office-word_0.1.2_1775357203910_0.6233489068559157","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@ap666/office-word","version":"0.1.3","keywords":["vue3","tiptap","rich-text-editor","component-library"],"license":"MIT","_id":"@ap666/office-word@0.1.3","maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"homepage":"https://cgq001.github.io/office-docs/","dist":{"shasum":"a5cd45da91b983f6176ed8c2bc2c15946eb7c3cf","tarball":"https://registry.npmjs.org/@ap666/office-word/-/office-word-0.1.3.tgz","fileCount":47,"integrity":"sha512-P8Hfr0hJ+WoNQRenB0wEofTiYpEb7Yaje5ag1oPT0A5w2ogucJBpCTyyD55IJSoo9aFqQr98A8tjQv8kfnm38g==","signatures":[{"sig":"MEQCIBzRMU+ChBUBCRn7mCrfuAAjXqMoFokWJCTm0u7ZtUbyAiBHLout28W4GdKwGUdocDUHFzEmdramCNIe/YcxuCt6ww==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5364510},"main":"./dist/index.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"./style.css":"./dist/style.css"},"gitHead":"a752bacd70cb49db8b80029640cc88ed5cfc0d89","_npmUser":{"name":"cgq001","email":"805696667@qq.com"},"_npmVersion":"10.9.0","description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.12.0","dependencies":{"plyr":"^3.8.4","jspdf":"^4.2.1","katex":"^0.16.44","marked":"^17.0.5","html2canvas":"^1.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.5.0","lowlight":"^3.3.0","@tiptap/pm":"^3.22.1","@tiptap/core":"^3.22.1","@tiptap/vue-3":"^3.22.1","@tiptap/starter-kit":"^3.22.1","@tiptap/extension-table":"^3.22.1","@tiptap/extension-subscript":"^3.22.1","@tiptap/extension-table-row":"^3.22.1","@tiptap/extension-task-item":"^3.22.1","@tiptap/extension-task-list":"^3.22.1","@tiptap/extension-underline":"^3.22.1","@tiptap/extension-code-block":"^3.22.1","@tiptap/extension-table-cell":"^3.22.1","@tiptap/extension-text-style":"^3.22.1","@tiptap/extension-font-family":"^3.22.1","@tiptap/extension-placeholder":"^3.22.1","@tiptap/extension-superscript":"^3.22.1","@tiptap/extension-table-header":"^3.22.1","@tiptap/extension-code-block-lowlight":"^3.22.1"},"_npmOperationalInternal":{"tmp":"tmp/office-word_0.1.3_1775375581150_0.5762128566704328","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@ap666/office-word","version":"0.1.5","keywords":["vue3","tiptap","rich-text-editor","component-library"],"license":"MIT","_id":"@ap666/office-word@0.1.5","maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"homepage":"https://cgq001.github.io/office-docs/","dist":{"shasum":"4a0babb13e922bcf5346c8414920e7c1ed9861de","tarball":"https://registry.npmjs.org/@ap666/office-word/-/office-word-0.1.5.tgz","fileCount":50,"integrity":"sha512-vLITjJgkdcf1o34suTIJ2uUJonp2nBqpdvUaSQTjxd5zh8uMj9Y2kyuTHFM6VahiKnyMFtsaCS/Rb9OuwdcYyw==","signatures":[{"sig":"MEQCID/AtdLcxaUX6laCK0HCAMCZ8t8jpCw9r1FsnYy0oweYAiB3nVcGKcQWSRTGp8v7KCDzH5cxs2+Rmu4tjyVdLr6GVg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5381024},"main":"./dist/index.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"./style.css":"./dist/style.css"},"gitHead":"9be431fd6d6d04170317727948890983b7dadcde","_npmUser":{"name":"cgq001","email":"805696667@qq.com"},"_npmVersion":"10.9.0","description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.12.0","dependencies":{"plyr":"^3.8.4","jspdf":"^4.2.1","katex":"^0.16.44","marked":"^17.0.5","html2canvas":"^1.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.5.0","yjs":"^13.6.30","lowlight":"^3.3.0","@tiptap/pm":"^3.22.1","@tiptap/core":"^3.22.1","@tiptap/vue-3":"^3.22.1","y-prosemirror":"^1.2.6","@tiptap/y-tiptap":"^3.0.2","@tiptap/starter-kit":"^3.22.1","@tiptap/extension-table":"^3.22.1","@tiptap/extension-subscript":"^3.22.1","@tiptap/extension-table-row":"^3.22.1","@tiptap/extension-task-item":"^3.22.1","@tiptap/extension-task-list":"^3.22.1","@tiptap/extension-underline":"^3.22.1","@tiptap/extension-code-block":"^3.22.1","@tiptap/extension-table-cell":"^3.22.1","@tiptap/extension-text-style":"^3.22.1","@tiptap/extension-font-family":"^3.22.1","@tiptap/extension-placeholder":"^3.22.1","@tiptap/extension-superscript":"^3.22.1","@tiptap/extension-table-header":"^3.22.1","@tiptap/extension-collaboration":"^3.22.2","@tiptap/extension-code-block-lowlight":"^3.22.1","@tiptap/extension-collaboration-caret":"^3.22.2"},"_npmOperationalInternal":{"tmp":"tmp/office-word_0.1.5_1775388865328_0.1988560976776117","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@ap666/office-word","version":"0.1.6","keywords":["vue3","tiptap","rich-text-editor","component-library"],"license":"MIT","_id":"@ap666/office-word@0.1.6","maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"homepage":"https://cgq001.github.io/office-docs/","dist":{"shasum":"6890413aaedc2ce56320aa2328769edbaed0bc28","tarball":"https://registry.npmjs.org/@ap666/office-word/-/office-word-0.1.6.tgz","fileCount":52,"integrity":"sha512-BFAmkW4VTk7wTkjDEPYGENAo8+FBTMIP1v7x3TFKi7S1HhkHJOtq5Vx83eBwm9kw1fAu/uOT/QS3iqsRu4hkJA==","signatures":[{"sig":"MEUCIQDBrGBsVrO2FFxiF6S2zpZtb7yOrXTg1EDcj0Hxv8RoYgIgf2humPUoPg+h90XwprgrHRsNYNmRErKvEMaW3ueS/sU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5408934},"main":"./dist/index.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"./style.css":"./dist/style.css"},"gitHead":"82a30864d6244d24e99af2b9a567b021ba156b4f","_npmUser":{"name":"cgq001","email":"805696667@qq.com"},"_npmVersion":"10.9.0","description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.12.0","dependencies":{"plyr":"^3.8.4","jspdf":"^4.2.1","katex":"^0.16.44","marked":"^17.0.5","html2canvas":"^1.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.5.0","yjs":"^13.6.30","lowlight":"^3.3.0","@tiptap/pm":"^3.22.1","@tiptap/core":"^3.22.1","@tiptap/vue-3":"^3.22.1","y-prosemirror":"^1.2.6","@tiptap/y-tiptap":"^3.0.2","@tiptap/starter-kit":"^3.22.1","@tiptap/extension-table":"^3.22.1","@tiptap/extension-subscript":"^3.22.1","@tiptap/extension-table-row":"^3.22.1","@tiptap/extension-task-item":"^3.22.1","@tiptap/extension-task-list":"^3.22.1","@tiptap/extension-underline":"^3.22.1","@tiptap/extension-code-block":"^3.22.1","@tiptap/extension-table-cell":"^3.22.1","@tiptap/extension-text-style":"^3.22.1","@tiptap/extension-font-family":"^3.22.1","@tiptap/extension-placeholder":"^3.22.1","@tiptap/extension-superscript":"^3.22.1","@tiptap/extension-table-header":"^3.22.1","@tiptap/extension-collaboration":"^3.22.2","@tiptap/extension-code-block-lowlight":"^3.22.1","@tiptap/extension-collaboration-caret":"^3.22.2"},"_npmOperationalInternal":{"tmp":"tmp/office-word_0.1.6_1776088390444_0.0589346900550094","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@ap666/office-word","version":"0.1.7","keywords":["vue3","tiptap","rich-text-editor","component-library"],"license":"MIT","_id":"@ap666/office-word@0.1.7","maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"homepage":"https://cgq001.github.io/office-docs/","dist":{"shasum":"e234db724a5b9c954f671633987f93711b88bd57","tarball":"https://registry.npmjs.org/@ap666/office-word/-/office-word-0.1.7.tgz","fileCount":53,"integrity":"sha512-WCqdg6lVlLPZDVUE/v7Pd5nyKiBmb1KWnRdiQweEgWZkm85oBY6SOYMKBvLNuHZkcmj8xVyendF31qgP8MjjfQ==","signatures":[{"sig":"MEYCIQCe28Qo6wc67dXqWmczaxSC3uUnBZxWj6Nkwg11XwZLfAIhANBH3tZry2H5+G3cWT6ahCKAihXcb/QXl1SYWoTadbC9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5421801},"main":"./dist/index.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"./style.css":"./dist/style.css"},"gitHead":"5e21a0d707043baeb84e5a7b6659951f3b9f20b3","_npmUser":{"name":"cgq001","email":"805696667@qq.com"},"_npmVersion":"10.9.0","description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.12.0","dependencies":{"plyr":"^3.8.4","jspdf":"^4.2.1","katex":"^0.16.44","marked":"^17.0.5","html2canvas":"^1.4.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.5.0","yjs":"^13.6.30","lowlight":"^3.3.0","@tiptap/pm":"^3.22.1","@tiptap/core":"^3.22.1","@tiptap/vue-3":"^3.22.1","y-prosemirror":"^1.2.6","@tiptap/y-tiptap":"^3.0.2","@tiptap/starter-kit":"^3.22.1","@tiptap/extension-table":"^3.22.1","@tiptap/extension-subscript":"^3.22.1","@tiptap/extension-table-row":"^3.22.1","@tiptap/extension-task-item":"^3.22.1","@tiptap/extension-task-list":"^3.22.1","@tiptap/extension-underline":"^3.22.1","@tiptap/extension-code-block":"^3.22.1","@tiptap/extension-table-cell":"^3.22.1","@tiptap/extension-text-style":"^3.22.1","@tiptap/extension-font-family":"^3.22.1","@tiptap/extension-placeholder":"^3.22.1","@tiptap/extension-superscript":"^3.22.1","@tiptap/extension-table-header":"^3.22.1","@tiptap/extension-collaboration":"^3.22.2","@tiptap/extension-code-block-lowlight":"^3.22.1","@tiptap/extension-collaboration-caret":"^3.22.2"},"_npmOperationalInternal":{"tmp":"tmp/office-word_0.1.7_1776091254574_0.800275903437794","host":"s3://npm-registry-packages-npm-production"}},"0.2.10":{"name":"@ap666/office-word","version":"0.2.10","description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","type":"module","main":"./dist/index.umd.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"./style.css":"./dist/style.css"},"sideEffects":["*.css"],"keywords":["vue3","tiptap","rich-text-editor","component-library"],"license":"MIT","homepage":"https://cgq001.github.io/office-docs/","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"peerDependencies":{"@tiptap/core":"^3.22.1","@tiptap/extension-code-block":"^3.22.1","@tiptap/extension-code-block-lowlight":"^3.22.1","@tiptap/extension-collaboration":"^3.22.2","@tiptap/extension-collaboration-caret":"^3.22.2","@tiptap/extension-font-family":"^3.22.1","@tiptap/extension-placeholder":"^3.22.1","@tiptap/extension-subscript":"^3.22.1","@tiptap/extension-superscript":"^3.22.1","@tiptap/extension-table":"^3.22.1","@tiptap/extension-table-cell":"^3.22.1","@tiptap/extension-table-header":"^3.22.1","@tiptap/extension-table-row":"^3.22.1","@tiptap/extension-task-item":"^3.22.1","@tiptap/extension-task-list":"^3.22.1","@tiptap/extension-text-style":"^3.22.1","@tiptap/extension-underline":"^3.22.1","@tiptap/pm":"^3.22.1","@tiptap/starter-kit":"^3.22.1","@tiptap/vue-3":"^3.22.1","@tiptap/y-tiptap":"^3.0.2","lowlight":"^3.3.0","vue":"^3.5.0","y-prosemirror":"^1.2.6","yjs":"^13.6.30"},"dependencies":{"html2canvas":"^1.4.1","jspdf":"^4.2.1","katex":"^0.16.44","marked":"^17.0.5","plyr":"^3.8.4"},"_id":"@ap666/office-word@0.2.10","gitHead":"a0421713c1da4953e0d908ce112f8cf2147096a5","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-UNb9sy5foJA6zE9T2g2DkOTo0MF8sH2zC7aGy1QbAPmrcaDPQbf0lafUO3LHujLM/KhZqG+8WNT5sb/pKGk3rw==","shasum":"b1bab5f8f678dea0096abfcf69360bfa13386b01","tarball":"https://registry.npmjs.org/@ap666/office-word/-/office-word-0.2.10.tgz","fileCount":53,"unpackedSize":5584594,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICpsNDbe2usIeAxXDFyaxo7PtHIZLPXM5/xVsBNCQoBxAiAStTcISLlllG0YqLmVjmXt8oBFKOAfN7AMS17btXJ1lQ=="}]},"_npmUser":{"name":"cgq001","email":"805696667@qq.com"},"directories":{},"maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/office-word_0.2.10_1777707317349_0.5494313590622557"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-05T01:47:40.438Z","modified":"2026-05-02T07:35:17.694Z","0.1.0":"2026-04-05T01:47:40.828Z","0.1.1":"2026-04-05T02:38:54.957Z","0.1.2":"2026-04-05T02:46:44.116Z","0.1.3":"2026-04-05T07:53:01.406Z","0.1.5":"2026-04-05T11:34:25.600Z","0.1.6":"2026-04-13T13:53:10.630Z","0.1.7":"2026-04-13T14:40:54.754Z","0.2.10":"2026-05-02T07:35:17.569Z"},"license":"MIT","homepage":"https://cgq001.github.io/office-docs/","keywords":["vue3","tiptap","rich-text-editor","component-library"],"description":"A reusable Vue 3 rich text editor component built with Tiptap 3.","maintainers":[{"name":"cgq001","email":"805696667@qq.com"}],"readme":"# @ap666/office-word\n\n个人开发，未全方位测试，用于生产请多测试一下\n\n中文 | [English](#english)\n\n## 中文\n\n`@ap666/office-word` 是一个基于 Vue 3 和 Tiptap 3 的富文本编辑器组件，内置文档式编辑界面、图片/视频/文件块、表格、公式、倒计时、高亮块、大纲、预览模式、导出能力，以及可选的 Yjs 协同编辑。\n\n### 安装\n\n```bash\nnpm install @ap666/office-word\n```\n\n组件样式会作为独立 CSS 文件发布。建议在应用入口显式引入：\n\n```ts\nimport '@ap666/office-word/style.css'\n```\n\n如果你的包管理器没有自动安装 peer dependencies，请同时安装运行时 peer 包：\n\n```bash\nnpm install vue @tiptap/core @tiptap/vue-3 @tiptap/pm @tiptap/starter-kit @tiptap/extension-placeholder @tiptap/extension-code-block @tiptap/extension-code-block-lowlight @tiptap/extension-collaboration @tiptap/extension-collaboration-caret @tiptap/extension-font-family @tiptap/extension-subscript @tiptap/extension-superscript @tiptap/extension-table @tiptap/extension-table-cell @tiptap/extension-table-header @tiptap/extension-table-row @tiptap/extension-task-item @tiptap/extension-task-list @tiptap/extension-text-style @tiptap/extension-underline @tiptap/y-tiptap lowlight y-prosemirror yjs\n```\n\n`html2canvas`、`jspdf`、`katex`、`marked`、`plyr` 已作为普通 dependencies 随包安装。\n\n### 快速开始\n\n```vue\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport type { JSONContent } from '@tiptap/core'\nimport { RichTextEditor } from '@ap666/office-word'\nimport '@ap666/office-word/style.css'\n\nconst content = ref<JSONContent | null>(null)\n</script>\n\n<template>\n  <RichTextEditor v-model=\"content\" />\n</template>\n```\n\n也可以使用默认导出：\n\n```ts\nimport RichTextEditor from '@ap666/office-word'\n```\n\n### Props\n\n| Prop | 类型 | 默认值 | 说明 |\n| --- | --- | --- | --- |\n| `modelValue` | `JSONContent \\| null` | `null` | 编辑器内容，支持 `v-model`。 |\n| `editable` | `boolean` | `true` | 是否允许编辑。 |\n| `mode` | `'edit' \\| 'preview'` | `'edit'` | 编辑模式或预览模式。 |\n| `outlinePlacement` | `'left' \\| 'right'` | `'right'` | 大纲面板位置。 |\n| `messages` | `RichTextEditorMessages \\| null` | `null` | 覆盖内置 UI 文案。 |\n| `enabledExportItems` | `RichTextEditorExportItemKey[] \\| null` | `null` | 导出菜单白名单。 |\n| `enabledInsertMenuItems` | `RichTextEditorInsertMenuItemKey[] \\| null` | `null` | 插入菜单白名单。 |\n| `enabledToolbarActions` | `RichTextEditorToolbarActionKey[] \\| null` | `null` | 工具栏能力白名单。 |\n| `placeholder` | `string` | `''` | 空内容占位文案。 |\n| `collaboration` | `RichTextEditorCollaborationOptions \\| null` | `null` | Yjs 协同配置。 |\n\n白名单 props 不传时表示启用全部内置项；传入数组后，仅数组里的项目会显示并可用。\n\n```vue\n<RichTextEditor\n  v-model=\"content\"\n  :enabled-export-items=\"['html', 'image']\"\n  :enabled-insert-menu-items=\"['image', 'local-file', 'blockquote']\"\n  :enabled-toolbar-actions=\"['blockquote']\"\n/>\n```\n\n### 可用 Key\n\n导出菜单：\n\n```ts\ntype RichTextEditorExportItemKey = 'pdf' | 'html' | 'image' | 'print'\n```\n\n插入菜单：\n\n```ts\ntype RichTextEditorInsertMenuItemKey =\n  | 'image'\n  | 'video'\n  | 'table'\n  | 'local-file'\n  | 'columns'\n  | 'highlight-block'\n  | 'date'\n  | 'code-block'\n  | 'formula'\n  | 'blockquote'\n  | 'emoji'\n  | 'link'\n  | 'divider'\n  | 'countdown'\n  | 'markdown-import'\n```\n\n工具栏：\n\n```ts\ntype RichTextEditorToolbarActionKey = 'blockquote'\n```\n\n### 事件\n\n| 事件 | Payload | 说明 |\n| --- | --- | --- |\n| `update:modelValue` | `JSONContent` | 内容更新，用于 `v-model`。 |\n| `change` | `JSONContent` | 内容更新事件。 |\n| `local-file-upload` | `RichTextEditorLocalFilePayload` | 用户通过本地文件选择器插入文件后触发。 |\n| `local-file-download` | `RichTextEditorLocalFilePayload` | 用户点击本地文件卡片下载按钮时触发。 |\n\n### 自定义文案\n\n编辑器默认 UI 文案为中文。你可以用 `messages` 覆盖任意 key：\n\n```vue\n<RichTextEditor\n  v-model=\"content\"\n  :messages=\"{\n    'insert.localFile': '附件',\n    'export.label': '下载',\n  }\"\n/>\n```\n\n常用文案 key：\n\n| Key | 默认中文 |\n| --- | --- |\n| `insert.label` | 插入 |\n| `insert.section.general` | 通用 |\n| `insert.section.apps` | 小应用 |\n| `insert.section.external` | 外部内容 |\n| `insert.image` | 图片 |\n| `insert.video` | 视频 |\n| `insert.table` | 表格 |\n| `insert.localFile` | 本地文件 |\n| `insert.columns` | 分栏 |\n| `insert.highlightBlock` | 高亮块 |\n| `insert.date` | 日期 |\n| `insert.codeBlock` | 代码块 |\n| `insert.formula` | 公式 |\n| `insert.blockquote` | 引用 |\n| `insert.emoji` | 表情符号 |\n| `insert.link` | 超链接 |\n| `insert.divider` | 分隔线 |\n| `insert.countdown` | 倒计时 |\n| `insert.markdownImport` | Markdown 导入 |\n| `export.label` | 导出 |\n| `export.pdf` | 导出 PDF |\n| `export.pdf.loading` | 导出 PDF 中... |\n| `export.html` | 导出 HTML |\n| `export.html.loading` | 导出 HTML 中... |\n| `export.image` | 导出图片 |\n| `export.image.loading` | 导出图片中... |\n| `print.label` | 打印 |\n| `print.loading` | 打印中... |\n| `quote.apply` | 应用引用 |\n| `quote.cancel` | 取消引用 |\n| `quote.borderColor` | 边框颜色 |\n| `quote.backgroundColor` | 背景颜色 |\n| `outline.label` | 大纲 |\n| `outline.collapse` | 收起大纲 |\n| `outline.empty.description` | 对文档内容应用“标题”样式，即可自动生成大纲。 |\n| `outline.empty.tip` | 点击左下角“大纲”按钮可以随时展开或收起。 |\n| `status.wordCountUnit` | 个字 |\n| `status.presentation.enter` | 演示 |\n| `status.presentation.exit` | 退出演示 |\n| `status.fullscreen.enter` | 全屏 |\n| `status.fullscreen.exit` | 退出全屏 |\n| `countdown.selectTime` | 请选择时间 |\n| `countdown.settingsTitle` | 倒计时设置 |\n| `formula.insertTitle` | 插入 LaTeX 公式 |\n\n### 预览模式\n\n`mode=\"preview\"` 会切换到只读预览外壳。预览模式下工具栏隐藏，编辑禁用，大纲仍可放在左侧或右侧。\n\n```vue\n<RichTextEditor\n  v-model=\"content\"\n  mode=\"preview\"\n  outline-placement=\"right\"\n/>\n```\n\n窄屏下预览模式会自动缩放页面画布，让文档在手机上保持可读。\n\n### 协同编辑\n\n组件支持普通单人编辑，也支持可选的 Yjs 协同编辑。\n\n```vue\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport * as Y from 'yjs'\nimport { WebsocketProvider } from 'y-websocket'\nimport type { JSONContent } from '@tiptap/core'\nimport { RichTextEditor } from '@ap666/office-word'\nimport '@ap666/office-word/style.css'\n\nconst ydoc = new Y.Doc()\nconst provider = new WebsocketProvider('ws://localhost:1234', 'office-word-demo', ydoc)\nconst content = ref<JSONContent | null>(null)\n</script>\n\n<template>\n  <RichTextEditor\n    v-model=\"content\"\n    :collaboration=\"{\n      document: ydoc,\n      field: 'content',\n      provider,\n      user: {\n        name: '张三',\n        color: '#3b82f6',\n      },\n    }\"\n  />\n</template>\n```\n\n协同模式下，Yjs fragment 是内容的事实来源。组件仍会 emit JSON 更新，但外部 `modelValue` 的变化不会再反向写入编辑器。如果需要远程光标，请在宿主项目安装 `y-websocket`，并传入 `provider` 和 `user`。\n\n不要把 `modelValue` 当作协同房间的初始化种子。如果房间需要默认内容，请在挂载编辑器之前先初始化 Yjs 文档。\n\n### 内置 Yjs 服务示例\n\n发布包内包含一个最小 Yjs WebSocket 服务示例：\n\n```bash\ncd node_modules/@ap666/office-word/yjs\nnpm install\nnpm run start\n```\n\n默认监听地址为 `ws://0.0.0.0:1234`。客户端需要使用相同 WebSocket 地址和房间名：\n\n```ts\nimport * as Y from 'yjs'\nimport { WebsocketProvider } from 'y-websocket'\n\nconst ydoc = new Y.Doc()\nconst provider = new WebsocketProvider('ws://127.0.0.1:1234', 'office-word-demo', ydoc)\n```\n\n### 实例 API\n\n通过 Vue `ref` 获取组件实例方法：\n\n```vue\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { RichTextEditor } from '@ap666/office-word'\nimport type { RichTextEditorInstance } from '@ap666/office-word'\n\nconst editorRef = ref<RichTextEditorInstance | null>(null)\n</script>\n\n<template>\n  <RichTextEditor ref=\"editorRef\" />\n</template>\n```\n\n可用方法：\n\n| 方法 | 返回值 | 说明 |\n| --- | --- | --- |\n| `exportPdf()` | `Promise<Blob \\| null>` | 导出 PDF。 |\n| `exportImage(options?)` | `Promise<Blob \\| null>` | 导出图片，支持 PNG/JPEG。 |\n| `exportHtml()` | `string \\| null` | 导出 HTML 字符串。 |\n| `insertImage(payload)` | `boolean` | 插入 1 到 4 张图片。 |\n| `insertVideo(payload)` | `boolean` | 插入视频块。 |\n| `insertFile(payload)` | `boolean` | 插入链接/文件预览块。 |\n| `insertLocalFile(payload)` | `boolean` | 插入本地文件卡片。 |\n| `openLocalFilePicker()` | `void` | 打开本地文件选择器。 |\n| `focus()` | `void` | 聚焦编辑器。 |\n| `getJSON()` | `JSONContent \\| null` | 获取当前 JSON 内容。 |\n\n### 上传并插入\n\n推荐集成流程：\n\n1. 在业务层上传文件。\n2. 等待接口返回可访问 URL。\n3. 调用组件实例方法插入返回内容。\n\n插入图片：\n\n```ts\nasync function uploadImage(file: File) {\n  const imageUrl = await yourUploadApi(file)\n\n  editorRef.value?.insertImage({\n    src: imageUrl,\n    name: file.name,\n    alt: file.name,\n    description: '',\n  })\n}\n```\n\n一次最多插入 4 张图片：\n\n```ts\neditorRef.value?.insertImage([\n  { src: 'https://cdn.example.com/a.png', name: 'a.png' },\n  { src: 'https://cdn.example.com/b.png', name: 'b.png' },\n])\n```\n\n插入视频：\n\n```ts\nasync function uploadVideo(file: File) {\n  const videoUrl = await yourUploadApi(file)\n\n  editorRef.value?.insertVideo({\n    src: videoUrl,\n    name: file.name,\n    mimeType: file.type || 'video/mp4',\n    description: 'video description',\n  })\n}\n```\n\n插入文件链接/预览块：\n\n```ts\nasync function uploadFile(file: File) {\n  const fileUrl = await yourUploadApi(file)\n\n  editorRef.value?.insertFile({\n    url: fileUrl,\n    name: file.name,\n    displayMode: 'text',\n  })\n}\n```\n\n插入本地文件卡片：\n\n```ts\neditorRef.value?.insertLocalFile({\n  url: 'https://cdn.example.com/files/demo.txt',\n  name: 'demo.txt',\n  size: 2048,\n  mimeType: 'text/plain',\n})\n```\n\n### 导出示例\n\n```ts\nasync function handleExportPdf() {\n  const blob = await editorRef.value?.exportPdf()\n  if (!blob) return\n\n  const url = URL.createObjectURL(blob)\n  const link = document.createElement('a')\n  link.href = url\n  link.download = 'demo.pdf'\n  link.click()\n  URL.revokeObjectURL(url)\n}\n\nasync function handleExportImage() {\n  const blob = await editorRef.value?.exportImage({\n    type: 'image/png',\n  })\n  if (!blob) return\n\n  const url = URL.createObjectURL(blob)\n  window.open(url, '_blank')\n}\n\nfunction handleExportHtml() {\n  const html = editorRef.value?.exportHtml()\n  if (!html) return\n\n  console.log(html)\n}\n```\n\n### 类型导入\n\n```ts\nimport type {\n  RichTextEditorCollaborationProvider,\n  RichTextEditorCollaborationUser,\n  RichTextEditorCollaborationOptions,\n  RichTextEditorExportItemKey,\n  RichTextEditorFilePayload,\n  RichTextEditorImageExportOptions,\n  RichTextEditorImagePayload,\n  RichTextEditorInsertMenuItemKey,\n  RichTextEditorInstance,\n  RichTextEditorLocalFilePayload,\n  RichTextEditorMessages,\n  RichTextEditorProps,\n  RichTextEditorToolbarActionKey,\n  RichTextEditorVideoPayload,\n} from '@ap666/office-word'\n```\n\n### 包内文档\n\n- 使用指南：`docs/usage.md`\n- Yjs 服务示例：`yjs/README.md`\n\n## English\n\n`@ap666/office-word` is a reusable rich text editor component for Vue 3 and Tiptap 3. It ships with a document-style editing UI, image/video/file blocks, tables, formulas, countdown blocks, highlight blocks, outline navigation, preview mode, export APIs, and optional Yjs collaboration.\n\n### Installation\n\n```bash\nnpm install @ap666/office-word\n```\n\nThe component styles are published as a separate CSS file. Import it in your application entry:\n\n```ts\nimport '@ap666/office-word/style.css'\n```\n\nIf your package manager does not auto-install peer dependencies, install the runtime peer packages as well:\n\n```bash\nnpm install vue @tiptap/core @tiptap/vue-3 @tiptap/pm @tiptap/starter-kit @tiptap/extension-placeholder @tiptap/extension-code-block @tiptap/extension-code-block-lowlight @tiptap/extension-collaboration @tiptap/extension-collaboration-caret @tiptap/extension-font-family @tiptap/extension-subscript @tiptap/extension-superscript @tiptap/extension-table @tiptap/extension-table-cell @tiptap/extension-table-header @tiptap/extension-table-row @tiptap/extension-task-item @tiptap/extension-task-list @tiptap/extension-text-style @tiptap/extension-underline @tiptap/y-tiptap lowlight y-prosemirror yjs\n```\n\n`html2canvas`, `jspdf`, `katex`, `marked`, and `plyr` are regular dependencies and are installed with the package.\n\n### Quick Start\n\n```vue\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport type { JSONContent } from '@tiptap/core'\nimport { RichTextEditor } from '@ap666/office-word'\nimport '@ap666/office-word/style.css'\n\nconst content = ref<JSONContent | null>(null)\n</script>\n\n<template>\n  <RichTextEditor v-model=\"content\" />\n</template>\n```\n\nDefault import is also supported:\n\n```ts\nimport RichTextEditor from '@ap666/office-word'\n```\n\n### Props\n\n| Prop | Type | Default | Description |\n| --- | --- | --- | --- |\n| `modelValue` | `JSONContent \\| null` | `null` | Editor content. Supports `v-model`. |\n| `editable` | `boolean` | `true` | Enables or disables editing. |\n| `mode` | `'edit' \\| 'preview'` | `'edit'` | Edit mode or read-only preview mode. |\n| `outlinePlacement` | `'left' \\| 'right'` | `'right'` | Outline panel placement. |\n| `messages` | `RichTextEditorMessages \\| null` | `null` | Overrides built-in UI labels. |\n| `enabledExportItems` | `RichTextEditorExportItemKey[] \\| null` | `null` | Export menu whitelist. |\n| `enabledInsertMenuItems` | `RichTextEditorInsertMenuItemKey[] \\| null` | `null` | Insert menu whitelist. |\n| `enabledToolbarActions` | `RichTextEditorToolbarActionKey[] \\| null` | `null` | Toolbar action whitelist. |\n| `placeholder` | `string` | `''` | Placeholder text for empty content. |\n| `collaboration` | `RichTextEditorCollaborationOptions \\| null` | `null` | Yjs collaboration options. |\n\nWhen whitelist props are omitted, all built-in options remain enabled. Once a list is passed, only listed items are visible and usable.\n\n```vue\n<RichTextEditor\n  v-model=\"content\"\n  :enabled-export-items=\"['html', 'image']\"\n  :enabled-insert-menu-items=\"['image', 'local-file', 'blockquote']\"\n  :enabled-toolbar-actions=\"['blockquote']\"\n/>\n```\n\n### Available Keys\n\nExport menu:\n\n```ts\ntype RichTextEditorExportItemKey = 'pdf' | 'html' | 'image' | 'print'\n```\n\nInsert menu:\n\n```ts\ntype RichTextEditorInsertMenuItemKey =\n  | 'image'\n  | 'video'\n  | 'table'\n  | 'local-file'\n  | 'columns'\n  | 'highlight-block'\n  | 'date'\n  | 'code-block'\n  | 'formula'\n  | 'blockquote'\n  | 'emoji'\n  | 'link'\n  | 'divider'\n  | 'countdown'\n  | 'markdown-import'\n```\n\nToolbar:\n\n```ts\ntype RichTextEditorToolbarActionKey = 'blockquote'\n```\n\n### Events\n\n| Event | Payload | Description |\n| --- | --- | --- |\n| `update:modelValue` | `JSONContent` | Content update event used by `v-model`. |\n| `change` | `JSONContent` | Content update event. |\n| `local-file-upload` | `RichTextEditorLocalFilePayload` | Emitted after a local file is picked and inserted. |\n| `local-file-download` | `RichTextEditorLocalFilePayload` | Emitted when the local file card download button is clicked. |\n\n### Custom Labels\n\nThe default UI labels are Chinese. Use `messages` to override only the keys you need:\n\n```vue\n<RichTextEditor\n  v-model=\"content\"\n  :messages=\"{\n    'insert.localFile': 'Attachment',\n    'export.label': 'Download',\n  }\"\n/>\n```\n\nCommon message keys:\n\n| Key | Default Chinese | English meaning |\n| --- | --- | --- |\n| `insert.label` | 插入 | Insert |\n| `insert.section.general` | 通用 | General |\n| `insert.section.apps` | 小应用 | Apps |\n| `insert.section.external` | 外部内容 | External content |\n| `insert.image` | 图片 | Image |\n| `insert.video` | 视频 | Video |\n| `insert.table` | 表格 | Table |\n| `insert.localFile` | 本地文件 | Local file |\n| `insert.columns` | 分栏 | Columns |\n| `insert.highlightBlock` | 高亮块 | Highlight block |\n| `insert.date` | 日期 | Date |\n| `insert.codeBlock` | 代码块 | Code block |\n| `insert.formula` | 公式 | Formula |\n| `insert.blockquote` | 引用 | Quote |\n| `insert.emoji` | 表情符号 | Emoji |\n| `insert.link` | 超链接 | Link |\n| `insert.divider` | 分隔线 | Divider |\n| `insert.countdown` | 倒计时 | Countdown |\n| `insert.markdownImport` | Markdown 导入 | Markdown import |\n| `export.label` | 导出 | Export |\n| `export.pdf` | 导出 PDF | Export PDF |\n| `export.pdf.loading` | 导出 PDF 中... | Exporting PDF... |\n| `export.html` | 导出 HTML | Export HTML |\n| `export.html.loading` | 导出 HTML 中... | Exporting HTML... |\n| `export.image` | 导出图片 | Export image |\n| `export.image.loading` | 导出图片中... | Exporting image... |\n| `print.label` | 打印 | Print |\n| `print.loading` | 打印中... | Printing... |\n| `quote.apply` | 应用引用 | Apply quote |\n| `quote.cancel` | 取消引用 | Cancel quote |\n| `quote.borderColor` | 边框颜色 | Border color |\n| `quote.backgroundColor` | 背景颜色 | Background color |\n| `outline.label` | 大纲 | Outline |\n| `outline.collapse` | 收起大纲 | Collapse outline |\n| `outline.empty.description` | 对文档内容应用“标题”样式，即可自动生成大纲。 | Apply heading styles to generate an outline. |\n| `outline.empty.tip` | 点击左下角“大纲”按钮可以随时展开或收起。 | Use the Outline button to show or hide the outline. |\n| `status.wordCountUnit` | 个字 | characters |\n| `status.presentation.enter` | 演示 | Present |\n| `status.presentation.exit` | 退出演示 | Exit presentation |\n| `status.fullscreen.enter` | 全屏 | Fullscreen |\n| `status.fullscreen.exit` | 退出全屏 | Exit fullscreen |\n| `countdown.selectTime` | 请选择时间 | Select time |\n| `countdown.settingsTitle` | 倒计时设置 | Countdown settings |\n| `formula.insertTitle` | 插入 LaTeX 公式 | Insert LaTeX formula |\n\n### Preview Mode\n\nUse `mode=\"preview\"` to switch the component into a read-only preview shell. In preview mode, the toolbar is hidden, editing is disabled, and the outline can be placed on either side.\n\n```vue\n<RichTextEditor\n  v-model=\"content\"\n  mode=\"preview\"\n  outline-placement=\"right\"\n/>\n```\n\nOn narrow screens, preview mode automatically scales the page canvas so the document stays readable on phones.\n\n### Collaboration\n\nThe component supports both normal single-user editing and optional Yjs collaboration.\n\n```vue\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport * as Y from 'yjs'\nimport { WebsocketProvider } from 'y-websocket'\nimport type { JSONContent } from '@tiptap/core'\nimport { RichTextEditor } from '@ap666/office-word'\nimport '@ap666/office-word/style.css'\n\nconst ydoc = new Y.Doc()\nconst provider = new WebsocketProvider('ws://localhost:1234', 'office-word-demo', ydoc)\nconst content = ref<JSONContent | null>(null)\n</script>\n\n<template>\n  <RichTextEditor\n    v-model=\"content\"\n    :collaboration=\"{\n      document: ydoc,\n      field: 'content',\n      provider,\n      user: {\n        name: 'Zhang San',\n        color: '#3b82f6',\n      },\n    }\"\n  />\n</template>\n```\n\nIn collaboration mode, the shared Yjs fragment becomes the source of truth. The component still emits JSON updates, but external `modelValue` changes are not pushed back into the editor. If you want remote cursors, install `y-websocket` in the host project and pass `provider` plus `user`.\n\nDo not use `modelValue` as the initial seed source for a collaborative room. Seed the Yjs document before mounting the editor if the room needs default content.\n\n### Bundled Yjs Server Example\n\nThe published package includes a minimal Yjs WebSocket server example under `yjs/`.\n\n```bash\ncd node_modules/@ap666/office-word/yjs\nnpm install\nnpm run start\n```\n\nThe default address is `ws://0.0.0.0:1234`. Use the same WebSocket address and room name on every client:\n\n```ts\nimport * as Y from 'yjs'\nimport { WebsocketProvider } from 'y-websocket'\n\nconst ydoc = new Y.Doc()\nconst provider = new WebsocketProvider('ws://127.0.0.1:1234', 'office-word-demo', ydoc)\n```\n\n### Instance API\n\nUse a Vue `ref` to access the editor instance methods:\n\n```vue\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { RichTextEditor } from '@ap666/office-word'\nimport type { RichTextEditorInstance } from '@ap666/office-word'\n\nconst editorRef = ref<RichTextEditorInstance | null>(null)\n</script>\n\n<template>\n  <RichTextEditor ref=\"editorRef\" />\n</template>\n```\n\nAvailable methods:\n\n| Method | Return | Description |\n| --- | --- | --- |\n| `exportPdf()` | `Promise<Blob \\| null>` | Exports a PDF. |\n| `exportImage(options?)` | `Promise<Blob \\| null>` | Exports an image as PNG or JPEG. |\n| `exportHtml()` | `string \\| null` | Exports an HTML string. |\n| `insertImage(payload)` | `boolean` | Inserts 1 to 4 images. |\n| `insertVideo(payload)` | `boolean` | Inserts a video block. |\n| `insertFile(payload)` | `boolean` | Inserts a link/file preview block. |\n| `insertLocalFile(payload)` | `boolean` | Inserts a local file card. |\n| `openLocalFilePicker()` | `void` | Opens the local file picker. |\n| `focus()` | `void` | Focuses the editor. |\n| `getJSON()` | `JSONContent \\| null` | Returns the current JSON document. |\n\n### Upload And Insert\n\nRecommended integration flow:\n\n1. Upload the asset from your own business layer.\n2. Wait for the API to return the final accessible URL.\n3. Call the editor instance method to insert the returned content.\n\nInsert image:\n\n```ts\nasync function uploadImage(file: File) {\n  const imageUrl = await yourUploadApi(file)\n\n  editorRef.value?.insertImage({\n    src: imageUrl,\n    name: file.name,\n    alt: file.name,\n    description: '',\n  })\n}\n```\n\nYou can insert up to 4 images in one call:\n\n```ts\neditorRef.value?.insertImage([\n  { src: 'https://cdn.example.com/a.png', name: 'a.png' },\n  { src: 'https://cdn.example.com/b.png', name: 'b.png' },\n])\n```\n\nInsert video:\n\n```ts\nasync function uploadVideo(file: File) {\n  const videoUrl = await yourUploadApi(file)\n\n  editorRef.value?.insertVideo({\n    src: videoUrl,\n    name: file.name,\n    mimeType: file.type || 'video/mp4',\n    description: 'video description',\n  })\n}\n```\n\nInsert file link or preview:\n\n```ts\nasync function uploadFile(file: File) {\n  const fileUrl = await yourUploadApi(file)\n\n  editorRef.value?.insertFile({\n    url: fileUrl,\n    name: file.name,\n    displayMode: 'text',\n  })\n}\n```\n\nInsert a local file card:\n\n```ts\neditorRef.value?.insertLocalFile({\n  url: 'https://cdn.example.com/files/demo.txt',\n  name: 'demo.txt',\n  size: 2048,\n  mimeType: 'text/plain',\n})\n```\n\n### Export Example\n\n```ts\nasync function handleExportPdf() {\n  const blob = await editorRef.value?.exportPdf()\n  if (!blob) return\n\n  const url = URL.createObjectURL(blob)\n  const link = document.createElement('a')\n  link.href = url\n  link.download = 'demo.pdf'\n  link.click()\n  URL.revokeObjectURL(url)\n}\n\nasync function handleExportImage() {\n  const blob = await editorRef.value?.exportImage({\n    type: 'image/png',\n  })\n  if (!blob) return\n\n  const url = URL.createObjectURL(blob)\n  window.open(url, '_blank')\n}\n\nfunction handleExportHtml() {\n  const html = editorRef.value?.exportHtml()\n  if (!html) return\n\n  console.log(html)\n}\n```\n\n### Type Imports\n\n```ts\nimport type {\n  RichTextEditorCollaborationProvider,\n  RichTextEditorCollaborationUser,\n  RichTextEditorCollaborationOptions,\n  RichTextEditorExportItemKey,\n  RichTextEditorFilePayload,\n  RichTextEditorImageExportOptions,\n  RichTextEditorImagePayload,\n  RichTextEditorInsertMenuItemKey,\n  RichTextEditorInstance,\n  RichTextEditorLocalFilePayload,\n  RichTextEditorMessages,\n  RichTextEditorProps,\n  RichTextEditorToolbarActionKey,\n  RichTextEditorVideoPayload,\n} from '@ap666/office-word'\n```\n\n### Package Docs\n\n- Usage guide: `docs/usage.md`\n- Bundled Yjs server example: `yjs/README.md`\n","readmeFilename":"README.md"}