-
Notifications
You must be signed in to change notification settings - Fork 78
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
Vue 3 Support #158
Comments
Hi thanks for the report. We are aware of this and we're tracking this in the main CKEditor5 repo. If you would like to see it implemented faster, please add 👍 there, to bump it's popularity. Of course also feel free to add there anything you consider important. |
As per my ckeditor/ckeditor5#8135 (comment) it looks like the implementation requires changes to become Vue 3.x-compatible. I'm re-opening this issue to keep track of the development and I leave the issue in ckeditor5 open for documentation only. |
Quoting myself from ckeditor/ckeditor5#8135 (comment) because an idea just popped into my head:
What if we compiled (distributed) the component using Vue 3.x in ckeditor5-vue? If Then we'd only need to resolve cc @psmyrek |
TL;DRCurrent status:
To do:
Detailed notes what have been already investigated and doneAfter a several hours of digging in the migration guide and doing a lot of experiments, I was able to adapt the CKEditor component for both versions of Vue. The main change that I've made is that
Other changes that I was able to unify in CKEditor component for both versions:
There is one thing that is not possible to implement in Vue 3.x: programmatically unmounting (or destroying) Vue component from the DOM element. In Vue 2.x component instance have the And of course the component initialization/installation is totally different between these versions but this is nicely described in official guide. |
Thanks, @psmyrek! That's awesome work you did there. I skimmed through the PR and it got me thinking, is there any way we can run all these tests twice when There's this entry point for tests that could do
|
Is it as simple as https://webpack.js.org/configuration/resolve/#resolvealias? |
We could create two aliases, for Vue 2 and 3. And import proper packages by using those aliases. import Vue2 from 'Vue@2'
import Vue3 from 'Vue@3' It should work when you define aliases in config: module.exports = {
//...
resolve: {
alias: {
'Vue@2': /* ... */,
'Vue@3': /* ... */
}
}
}; |
Thank you for hints and ideas - they were all very helpful! 👍🏻 I've just updated my PR #160 and now all existing tests work for both Vue versions and we can run them for both Vue versions using Regarding the problem with dependencies (the Vue framework itself and the Vue Test Utils for tests) and their versions, I realized that I can't use my previous idea (which then was also improved by @pomek) to just alias Vue 2.x and Vue 3.x versions in webpack configuration as After splitting up the test into two separate test runs (one for each Vue version), the code coverage reports are also separated. In my opinion we should merge them because the component code targets both Vue versions, so in the same way the overall code coverage report should also reflect that fact. Things to do next:
|
@psmyrek any update on this? I saw it missed iteration 37. Are there plans to include this in the next release? |
This issue is more complicated than it appeared at first. The related PR #160 contains working component code for two versions of Vue, but it contains also various hacks which we want to get rid of. For this reason, we need more time to prepare a better solution. |
@psmyrek thanks for the update. |
Feature: `CKEditor` component supports Vue 3.x. Closes #158. BREAKING CHANGE: The `CKEditor` component no longer supports Vue 2.x.
Now Vue 3 has been released, do you know when you'll support it?
The text was updated successfully, but these errors were encountered: