Show error/warning in CM6 editor

Hello, I want to update CM 6 editor to show border for the .cm-editor class like this in case of error or warning -
Screenshot 2024-02-05 at 2.53.27 PM

How to update the editorState to indicate error or warning?

1 Like

EditorView.editorAttributes can be used, probably with a state field if this is dynamic, to add a class to the outer editor element.