parchment icon indicating copy to clipboard operation
parchment copied to clipboard

[Question] Is it possible to define how a blot is serialized ?

Open farhat-h opened this issue 2 years ago • 1 comments

Context: I'm trying to define a custom inline embed blot to display something similar to repo shields. The way, I'm currently implementing it as an IMG tag and setting an alt attribute that has a description of the image. Is it possible to make the blot be serialized to the value of the alt attribute when calling quill.getText()

farhat-h avatar Jul 15 '22 17:07 farhat-h

You can override the instance method value and lengths, to match what you expect to get from getText or getContents IIRC

ramarivera avatar Nov 19 '22 21:11 ramarivera