I am trying to add some custom attribute using formatText. What I have tried so far:
var Parchment = Quill.import('parchment');
var commentAttributor = new Parchment.Attributor.Attribute('comment', 'comment', {
scope: Parchment.Scope.INLINE
});
Quill.register(commentAttributor, true);
and the delta looks like this:
"ops": [
{
"insert": "aa"
},
{
"attributes": {
"comment": "abc",
"action": true
},
"insert": "aaaaaa"
},
{
"insert": "aaa"
},
{
"attributes": {
"storyblock": true
},
"insert": "\n"
},
{
"insert": "\n"
}
]
However, when I restored the data from delta, the attribute is gone... what am i doing wrong here?