[Parchment] Unable to create mention blot
See original GitHub issueSteps for Reproduction
I use VueJS and Quill in my project. Also I want to use quill-mention
. Everythings is Okay but when I select any option of mention, show me error:
I use this module like this:
<script>
import 'quill/dist/quill.snow.css';
import 'quill-mention/dist/quill.mention.min.css';
import {quillEditor} from 'vue-quill-editor';
import mention from 'quill-mention';
Quill.register({
'modules/mention': mention
});
export default {
components: {
quillEditor
},
props: {
toolbar: { default: false },
name:{default: ''},
id: { default: '' },
value: { default: '' },
placeholder: { default: ''}
},
data() {
return {
editorOption: {
modules: {
toolbar: [
[{'font': []}],
[{'header': [1, 2, 3, 4, 5, 6, false]}],
[{'align': []}, {'color': []}, {'background': []}],
['blockquote', {'direction': 'rtl'}],
['bold', 'italic'],
['underline', 'strike'],
[{'indent': '-1'}, {'indent': '+1'}],
[{'list': 'ordered'}, {'list': 'bullet'}],
['link', 'image']
],
mention: {
allowedChars: /^[A-Za-z\s]*$/,
mentionDenotationChars: ["@"],
offsetLeft : ($('body').hasClass('rtl') ? -250 : 0 ) ,
renderItem :function(item){
return item.display
},
source: function (searchTerm, renderList, mentionChar) {
var values = [
{ display: 'John', value: 'Fredrik Sundqvist' },
{ display: 'Sara', value: 'Patrik Sjölin' }
];
if (searchTerm.length === 0) {
renderList(values, searchTerm);
} else {
const matches = [];
for (var i = 0; i < values.length; i++)
if (~values[i].value.toLowerCase().indexOf(searchTerm.toLowerCase())) matches.push(values[i]);
renderList(matches, searchTerm);
}
}
}
},
placeholder: 'aaaaaaaaaaaaaaaaa',
theme: 'snow' // or 'bubble'
},
content: ''
}
},
created() {
.....
},
computed: {
.......
}
};
</script>
What’s problem? What should I do?
Platforms: Chrome Last version
Version: 1.3.6
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:5
Top Results From Across the Web
[Parchment] Unable to create mention blot · Issue #76 - GitHub
I use this module in Quill but error me: [Parchment] Unable to create mention blot I used this: import mention from 'quill-mention'; ...
Read more >angular 5 and quilljs [Parchment] Unable to create blot
I was apple to fix my problem with next approach ... declare var Quill: any; const BlockEmbed = Quill.import('blots/embed'); export class ...
Read more >Quill/Parchment error: Unable to create list-item blot - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >Getting to know QuillJS - Part 1 (Parchment, Blots, and Lifecycle)
When creating a Blot with Parchment.create(blotName) and passing in a ... be unable to make this distinction between Italic and AltItalic .
Read more >HtmlEditor - How to create a custom blot based on Quill's blot
You can get base Quill blots, formats, or Parchment by using the get method. I've prepared a code snippet to demonstrate this technique:....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Facing the same issue with everything setup perfect as described in readme.
HI i am facing the same issue, does anyone have a solution?