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

Selector type doesn't support string in react. #523

Closed
SreekuttanPS opened this issue Apr 18, 2024 · 2 comments
Closed

Selector type doesn't support string in react. #523

SreekuttanPS opened this issue Apr 18, 2024 · 2 comments

Comments

@SreekuttanPS
Copy link

Hi,
I have a tinymce editor in my react project (Self hosted - version 6.8.2). So I was looking through the docs and trying out some stuffs and I saw this 'selector' which can be used inside init. But when I try to add it like this :

selector: 'textarea',
Then the typescript error shows :

Type 'string' is not assignable to type 'undefined'.
So when I checked I found out that the type the gave to the selector is:

selector?: undefined
Does anyone know anything about this? Or is there any workaround for this?

@TheSpyder
Copy link
Member

I suspect that's because you aren't supposed to use the selector option in our React integration, you use the <Editor> component instead - but I'll transfer this to the react repository so that can be confirmed.

@TheSpyder TheSpyder transferred this issue from tinymce/tinymce Apr 19, 2024
@danoaky-tiny
Copy link
Contributor

Yes, the selector option is purposely overriden by the Editor component.
See https://www.tiny.cloud/docs/tinymce/latest/react-ref/#init

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

3 participants