Works for me in this example.
Parchment = Quill.import('parchment');
let config = {
scope: Parchment.Scope.BLOCK,
};
let MClass = new Parchment.Attributor.Class('mark', 'dom-mark', config);
Quill.register(MClass,true)
var quill = new Quill('#editor-container', {
modules: {
toolbar: [
[{ header: [1, 2, false] }],
['bold', 'italic', 'underline'],
['image', 'code-block']
]
},
placeholder: 'Compose an epic...',
theme: 'snow' // or 'bubble'
});
quill.format('mark', 'MarkThisHere');
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…