Open neo-teo opened 6 months ago
Up, exact same issue here.
Hey, If you need a live reproduction: https://ui-thing.behonbaker.com/goodies/quill#module It works fine in development. As for the issue of the register function not being available, I think you should change the editor value in the component from being a ref to a shallowRef
This issue is the same with #573
Same here
Try quill mention version 4.1.0
<script setup>
import "@/node_modules/quill-mention/dist/quill.mention.css";
import { QuillEditor } from "@vueup/vue-quill";
import "@vueup/vue-quill/dist/vue-quill.snow.css";
import Mention from "quill-mention";
const modelValue = ref('')
const modules = {
name: "mention",
module: Mention,
positioningStrategy: "fixed",
options: {
allowedChars: /^[A-Za-zÄÜÖäüö_-]*$/,
mentionDenotationChars: ["@"],
minChars: 1,
maxChars: 50,
source: function (searchTerm, renderList, mentionChar) {
let values;
const atValues = [
{ id: 1, value: "Data" },
{ id: 2, value: "Name" },
];
if (mentionChar === "@") {
values = atValues;
}
if (searchTerm.length === 0) {
renderList(values, searchTerm);
} else {
const matches = [];
for (let i = 0; i < values.length; i++)
if (
~values[i].value
.toLowerCase()
.indexOf(searchTerm.toLowerCase())
)
matches.push(values[i]);
renderList(matches, searchTerm);
}
},
},
}
</script>
<template>
<QuillEditor :content="modelValue" :modules="modules" theme="snow" contentType="html" toolbar="full" />
</template>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Version @vueup/vue-quill version 1.2.0
Describe the bug Can't register the quill-mention module on QuillEditor. It may have to do with how I am attempting to register the
MentionBlot
.To Reproduce I am trying to register quill-mention on my vue-quill QuillEditor.
By following the quill-mention and Modules docs, I attempt to register quill-mention like this:
const modules = [ { name: 'blots/mention', module: MentionBlot, }, { name: 'modules/mention', module: Mention, }, ];
<QuillEditor :modules="modules" ref="quillEditor" @ready="onEditorReady" :content="props.value" @update:content="(event) => emits('update:value', event)" class="focus-visible:ring-0 rounded-b-md" contentType="html" toolbar="#editor-toolbar" />