Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using in SvelteKit Type script project #51

Open
ethan-tqa opened this issue Jan 23, 2022 · 3 comments
Open

Error when using in SvelteKit Type script project #51

ethan-tqa opened this issue Jan 23, 2022 · 3 comments

Comments

@ethan-tqa
Copy link

ethan-tqa commented Jan 23, 2022

As I follow the guide in readme to use this editor with a SvelteKit Typescript project, I got hit with the error:

Element does not support attributes because type definitions are missing for this Svelte Component or element cannot be used as such.

Underlying error:
JSX element class does not support attributes because it does not have a '$$prop_def' property.ts(2607)
Type definitions are missing for this Svelte Component. It needs a class definition with at least the property '$$prop_def' which should contain a map of input property definitions.
Example:
  class ComponentName { $$prop_def: { propertyName: string; } }
If you are using Svelte 3.31+, use SvelteComponentTyped:
  import type { SvelteComponentTyped } from "svelte";
  class ComponentName extends SvelteComponentTyped<{propertyName: string;}> {}

Underlying error:
'Editor' cannot be used as a JSX component.
  Its instance type 'Editor' is not a valid JSX element.
    Property '$$prop_def' is missing in type 'Editor' but required in type 'ElementClass'.ts(2786)

It appears that the type definition needs some changes

@talwat
Copy link

talwat commented Jun 18, 2022

I am also getting this issue within vscode.

@ethan-tqa
Copy link
Author

I switched to CK Editor instead

@talwat
Copy link

talwat commented Jun 18, 2022

Are there some good resources for learning how to use CK Editor in svelte? I've tried it but I couldn't figure out how to do a few things like get the text once a button is clicked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants