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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…