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

Events support #1

Open
vincenzobologna opened this issue Apr 5, 2019 · 0 comments
Open

Events support #1

vincenzobologna opened this issue Apr 5, 2019 · 0 comments

Comments

@vincenzobologna
Copy link

Hi,

i wrote event support to summernote. Just add this code to function mounted()

var self = this var initOptions = { lang: 'zh-CN', placeholder: self.placeholder, height: self.height, minHeight: self.minHeight, maxHeight: self.maxHeight, focus: self.focus, callbacks: { onInit: function () { self.$emit('onInit') }, onEnter: function () { self.$emit('onEnter') }, onFocus: function () { self.$emit('onFocus') }, onBlur: function () { self.$emit('onBlur') }, onKeyup: function (e) { self.$emit('onKeyup', e) }, onKeydown: function (e) { self.$emit('onKeydown', e) }, onPaste: function (e) { self.$emit('onPaste', e) }, onImageUpload: function (files) { self.$emit('onImageUpload', files) }, onChange: function (contents) { self.$emit('onChange', contents) } } } var params = Object.assign({}, initOptions, options) $(this.$el).summernote(params)

I tried to create a branch, but i can't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant