-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 Vue integration #13545
Comments
The result of PoC:
|
New Vue demo project was added in ckeditor/ckeditor5-vue#244 |
The Vue integration should work exactly as it did before the updates, but it now requires Editor version 37 or later. If developers have their IDEs set up properly for Vue.js development (e.g., by installing Volar and TypeScript Vue Plugin in VS Code), the new version should provide much better code suggestion and completion, and should show errors if passed props are of the wrong type. The new demo in the repository shows how to use the integration and gives an example of using all the props and events available in the component. Component name suggestion: Error when required Prop suggestions: Events suggestions: |
Out of curiosity: Why do you have |
Short answer: Long answer: The official recommendation from the Vue team is to use PascalCase or kebab-case for Vue components, so that they can be easily distinguished from regular HTML elements. To follow this recommendation (and make eslint happy), I changed the name of the components from Another recommendation is to use multi-word names to avoid potential conflicts when new HTML elements are introduced in the future (e.g. using |
Would Vue accept It hurts my eyes when I see |
@Reinmar Unfortunately, changing the name of the component to |
Feature: Improve typings for events emitted by the Vue component. Internal: Add Vue linter and apply suggestions. Internal: Update demo project to better reflect real-world usage. Closes ckeditor/ckeditor5#13545. MAJOR BREAKING CHANGE: Integration now requires Editor version 37 or later.
Part of #13471.
The text was updated successfully, but these errors were encountered: