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

[TS] PoC of using types in React integration #13546

Closed
arkflpc opened this issue Feb 24, 2023 · 1 comment
Closed

[TS] PoC of using types in React integration #13546

arkflpc opened this issue Feb 24, 2023 · 1 comment
Labels
domain:ts squad:core Issue to be handled by the Core team.

Comments

@arkflpc
Copy link
Contributor

arkflpc commented Feb 24, 2023

Part of #13471.

@arkflpc arkflpc added the squad:core Issue to be handled by the Core team. label Feb 24, 2023
@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Feb 24, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Mar 30, 2023
@martnpaneq
Copy link
Contributor

React integration with CKEditor 5 now supports TS and requires version 37 or later of the editor.

Previously, when using plain JavaScript there was no hinting for the name of the component, or any of it's props.
image

If the consumer project of ckeditor5-react uses TS, the IDE will provide hints for the <CKEditor /> component and will show the types of the properties.

With TypeScript, IDE hints for the component name and automatically imports the component:
image

IDE also informs that editor property is required:
image
And it hints all the possible properties along with their types:
image

IDE suggests what component should be provided as prop editor:
image

IDE is able to infer the types in actions based on the type of the used editor:
image

@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Mar 30, 2023
@CKEditorBot CKEditorBot modified the milestones: upcoming, iteration 61 Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ts squad:core Issue to be handled by the Core team.
Projects
None yet
Development

No branches or pull requests

5 participants