Hi, I am facing an issue when using atomicRange, but I do not know why it does not work as expected.
my code as follow
const atomicRanges = ViewPlugin. fromClass(
class {
decorations: DecorationSet;
constructor(view: EditorView) {
this . decorations = view.state?.field(atomField,l require: false)|I Decoration.none ;
}
update (update: ViewUpdate) {
this . decorations = update. state? . fieldCatomField,I require: false)ll Decoration. none;
}
}
{
decorations: (v) => {
return v. decorations;
},
provide: (pLugin) =>
EditorView. atomicRanges . of( value: (yiew: EditorView) => {
return view. plugin(pLugqin)? . decorationsIl Decoration.none ;
}),
}
);
Thanks.