-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
How to set focus on ckeditor #100
Comments
Hi @ctwhome You can use <template>
<vue-ckeditor
v-model="htmlContent"
type="classic"
ref="editor"
@focus="onFocus($event)"
/>
</template>
<script>
export default {
methods: {
onFocus(event) {
console.log(event);
}
}
}
</script> |
Hi @dangvanthanh |
Hi @ctwhome Currently, you can use Example <template>
<div>
<button @click.prevent="showEditor">Description</button>
<vue-ckeditor v-if="isShow" v-model="content" :config="config" ref="editor" />
</div>
</template>
<script>
import VueCkeditor from 'vue-ckeditor2';
export default {
name: "HelloWorld",
components: {
VueCkeditor
},
data() {
return {
isShow: false,
content: '',
config: {
toolbar: [
['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript']
],
height: 300,
startupFocus: true
}
};
},
methods: {
showEditor() {
this.isShow = !this.isShow;
}
}
};
</script>
<style scoped>
</style> Thank you very much for post issues. |
oke I will try and let you know, thank YOU for the effort |
Hi @dangvanthanh
|
Hi, I am not able to set focus on the CKEditor after mounting, do you know how to do it?
Thanks!
The text was updated successfully, but these errors were encountered: