The plugin’s decorations function is only provided with the current state. Is it possible for this decorations function to somehow access the editor’s attributes?
If I understand the docs for widget Decorations correctly, this should now be possible by passing a function instead of a DOM Node when creating a Widget Decoration. That function will get called with the view and a getPos callback.