I am struggling with MVVM in my application. I have a TabControl, each tab has a control that allows you to somehow edit the file. For example, text files or images. Each control is bound to a class from the ViewModel area (as shown in the diagram). I also have RoutedUICommands. One of these commands is WordWrap and only makes sense in the case of text files. This command is used in MenuItem or Button, etc. I would like to enable it only if the purpose of this command is text management. How to do it in accordance with MVVM?
More details:

XAML for the window has:
<Window.CommandBindings>
<CommandBinding Command="local:EditorCommands.WordWrap"
Executed="WordWrapExecuted"
CanExecute="CommandCanBeExecutedWhenAnythingIsOpen"/>
</Window.CommandBindings>
The menu item is used as follows:
<MenuItem Command="local:EditorCommands.WordWrap"/>
, Executed CanExecute: Window, , MVVM - , ViewModel.
, . ?
RoutedUICommand ?