Open michaelbukachi opened 6 years ago
I've got the exact same issue using vue2-editor. I presume this is because Quill is not defined globally in the module. Maybe should we fix Quill import in quill-emoji.js using
import _Quill from 'quill'
const Quill = window.Quill || _Quill
instead?
Hmm. That might work. Let me try it.
still not work!!!
Same here. I even tried modifying the library. Got a bunchof errors.
Hi all, I using another way. It working now.
` import Quill from 'quill' import quillEmij from 'quill-emoji/dist/quill-emoji'
const toolbarOptions = { container: [ ['bold', 'italic', 'underline'], ['emoji'] ], handlers: { emoji() {
},
},
} export default { name:'editor', components: {
},
props: ['content'],
data() {
return {
content: ''
}
},
methods: {
onCancel (){},
onSubmit () {},
setupEditor (){
let container = document.getElementById('macaw__editor');
let editor = new Quill(container, {
modules: {
"toolbar": toolbarOptions,
"emoji-toolbar": true
},
placeholder: '',
theme: 'snow'
});
}
},
mounted() {
// setup
this.setupEditor()
}
}`
I hope it helps.
Interesting. Let me try that.
same here. Has anyone solved the problem?
same here. Has anyone solved the problem?
Did you see my solution?
I tried it. Things broke. The web app I'm working on is highly dependent on Vue.
I tried it. Things broke. The web app I'm working on is highly dependent on Vue.
I did it. and it work fine. Could you show your code? And I can help
I told in previous post. Do not use vue-quill-editor. It doesn't work and I have my example following also.
Do you mind sharing a snippet of using Vue with quill without any third party library?
Out of curiosity, has anyone faced any issue integrating any other module besides this one with vue-quill-editor or vue-2-editor?
Is there really no way to make it work with vue-quill-editor?
@ploca14 I still haven't found one. Had to drop looking into the issue due some workload. I'll get back to it as soon as I'm free.
I found that I had to manually register the emoji modules to get it to work - so in my Vue component:
import Quill from 'quill'
import QuillEmoji from 'quill-emoji'
import { quillEditor } from 'vue-quill-editor'
Quill.register('modules/emoji-shortname', QuillEmoji.ShortNameEmoji)
then in the config:
modules: {
"emoji-shortname": true,
...
And it is working great!
@thatericsmith which vue quill editor are you using?
@michaelbukachi 3.0.6
@thatericsmith Do you mind providing your package.json
setup? I can't still get it to work with your provided config.
I wrote it according to your format. Can you help me? @thatericsmith
Did you solve the problem of emoji @michaelbukachi
@finebo No I wasn't able to get it work.
OK,maybe i will give up
---Original--- From: "Michael Bukachi"<notifications@github.com> Date: Thu, Mar 26, 2020 21:30 PM To: "contentco/quill-emoji"<quill-emoji@noreply.github.com>; Cc: "Mention"<mention@noreply.github.com>;"fine"<670785257@qq.com>; Subject: Re: [contentco/quill-emoji] quill Cannot import modules/emoji-toolbar. Are you sure it was registered? (#51)
@finebo No I wasn't able to get it work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
This worked for me (using vue2-editor)
Template:
` <vue-editor v-model="comment_content" :editorOptions="editorSettings"
`
Script:
import { VueEditor, Quill } from "vue2-editor";
import QuillEmoji from "quill-emoji";
import "quill-emoji/dist/quill-emoji.css";
Quill.register("modules/emoji", QuillEmoji);
export default {
components: { VueEditor },
data: () => ({
comment_content: null,
editorSettings: {
modules: {
toolbar: {
container: [["bold", "italic", "underline", "strike"], ["emoji"]],
handlers: { emoji: function () {} },
},
"emoji-toolbar": true,
"emoji-textarea": true,
"emoji-shortname": true,
},
},
})
}
I'm getting the following errors with the latest version 0.1.4:
Here's my code: