I used "deltaDecorations" function to set some inline decorations dynamically according to some rules when the editor is open. But when editing the contents, I want to remove all the existed decorations and renew some decorations. It seems that the new decorations are always appended to the existed ones, even the ranges are the same. How can I remove all the existed decorations and set the new ones?
Thanks a lot.