Quill-mention not supporting existing format like bold italics, underline #314
Unanswered
sahil-github101
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My Quill text after tagging is not getting bold even though the Bold option is selected. I am using quill-mentions for tagging operation.
import QuillMention from "quill-mention";
This is the sample that I am getting:
Hi @ABC how are you
Hi @abc how are you
and it should be Hi @abc how are you
The should be closed at the end but it gets closed whenever @ is pressed.
Mention Module:
};
Any context on how to use parchments for this?
I tried:
var Parchment = Quill.import("parchment");
config = {
scope: Parchment.Scope.INLINE
};
var formatAttributor = new Parchment.Attributor.Class("bold", "ql", config);
Quill.register(formatAttributor);
but didnt work
Current Bold format:
import Inline from "../blots/inline";
class Bold extends Inline {
static create() {
return super.create();
}
static formats() {
return true;
}
optimize(context) {
super.optimize(context);
if (this.domNode.tagName !== this.statics.tagName[0]) {
this.replaceWith(this.statics.blotName);
}
}
}
Bold.blotName = "bold";
Bold.tagName = ["STRONG", "B"];
export default Bold;
Beta Was this translation helpful? Give feedback.
All reactions