When the delta is created the return of the value()
method of your blot is inserted into the delta as insert directive. If your blot class has no value function the default return value is true for some blots. So when you apply that delta the text of your Blot will be true.
Check all parents classes of your blot for the value function and you see what is applied.
In your StarTagBlot
class add a function value()
. This function has to return the same as you would put into the first parameter of the delta insert method new Delta().insert({StarTagBlot: 'some text'}, attributesData)
to display your blot. If you have some text in your custom blot it should be something like this:
class StarTagBlot extends Inline {
...
//returns what delta expects as insert text
//if empty only true is returned
value() {
return { StarTagBlot: this.domNode.innerText.trim()};
}
...
}