vue-quill icon indicating copy to clipboard operation
vue-quill copied to clipboard

SSR with @vueup/vue-quill

Open NicTorgersen opened this issue 1 year ago • 1 comments

Version @vueup/vue-quill version 1.2.0

Describe the bug Using this package with SSR gives an error:

/var/www/html/node_modules/quill/dist/quill.js:7661
    var elem = document.createElement('div');
           ^
ReferenceError: document is not defined

To Reproduce Steps to reproduce the behavior:

  1. Install Laravel with Inertia and vite
  2. Set up SSR from Inertia docs: https://inertiajs.com/server-side-rendering
  3. Install @vueup/vue-quill
  4. vite build --ssr
  5. Set up component using the Vue Quill-package
  6. Run Laravel command to start ssr-server php artisan inertia:start-ssr

Expected behavior I would expect SSR to work using this package.

NicTorgersen avatar Jan 09 '24 09:01 NicTorgersen

Can send a snippet of your component that is using quill? I'm using it but have to force it under CSR because document is strictly a client-only element.

For now my quill looks like this:

<ClientOnly>
        <div class="bg-white">
            <QuillEditor theme="snow" toolbar="minimal" />
        </div>
</ClientOnly>

arffsaad avatar Feb 22 '24 05:02 arffsaad

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 23 '24 00:04 stale[bot]