Does it work with SvelteKit?
Hello, I'm trying to use this component in a SvelteKit app, but I'm encountering some css loading issues (see below). I saw there is a demo repo for using this editor with Sapper, but I'm wondering if there are known issues with SvelteKit. Here is what I've tried:
npm init svelte@next
npx svelte-add@latest tailwindcss
npm install
npm install -D tailwind-editor
But when I use the simple <Editor /> example given in the main page of this repo, I get lots of issues with tailwind styles not being properly loaded for the editor. Is there some special configuration I need to adjust to make it work for SvelteKit?
I downgraded tailwindcss from the latest 2.2.16 to 2.0.4 and the editor started working!
It would be good if the version dependency could be made explicit either in the main readme or in package.json for this component.
I still have problems to import it regarding using window on ssr. How did you solve it?
I still have problems to import it regarding using window on ssr. How did you solve it?
<script lang="ts">
import { browser } from '@svelte/kit'
if ( browser) {
// ... client side js here
}
</script>