-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
using vue-ckedtior in template with v-if #17
Comments
@fzikesch Can you use <template>
<div class="app">
<input type="checkbox" v-model="selected"> <span v-text="selectedText"></span>
<div v-if="selected">
<ckeditor v-model="msg"></ckeditor>
</div>
</div>
</template>
<script>
import Ckeditor from 'vue-ckeditor2'
export default {
components: { Ckeditor },
data () {
return {
selected: false,
msg: 'Vue ckeditor'
}
},
computed: {
selectedText () {
return this.selected ? 'Hide Ckeditor' : 'Show Ckeditor'
}
}
}
</script> I run code with vue-rollup-boilerplate templates. It's working fine. |
toggling the editor inside single view works fine. I tried out your suggestion with v-if But if the ckedtior is inside a component, which is marked as "keep-alive", it makes problems. To reproduce the problem, you need two vue-files. The inner-component file ./components/TestCkeditor.vue:
And as main
I have no idea, why this is corrupting the ckeditor instance. The problems seems to be the iframe of the ckeditor. (using CKEDITOR.inside works). But this seems not to be a issue of your work. In my case, the ckeditor is deep-inside components, where i don't no whether the parent-components are cached by vue or not - it depends on the |
@fzikesch Thank you. I see and can reproduce. I will improve it. |
Is there any update on this? I've got a similar issue when repositioning cards which contain ckEditor. Thanks! |
BUMP! |
Hello,
i've got some strange behaviour. We have a construct like
where <my-form-template> contains the <ckeditor> template.
However, when <my-form-template> is hidden (showForm := false) and shown again, the ckeditor does not work anymore.
Seems to be more a ckeditor issue (the iframe of the editor is corrupted, or whatever...).
But any ideas how to solve this problem?
As workaround i use a extra "active" property in ckeditor.vue in combination with a watcher
Has anybody a better idea?
The text was updated successfully, but these errors were encountered: