I know how to add items to the main menu. But what if I want to connect a handler to one that is already there by default? (For example "Select All").
That adds a second "Select All" menu item.
If I use CommandGroup(replacing: ...) then it replaces others, not just the "Select All"
Code Block WindowGroup { ContentView() }.commands { CommandGroup(after: CommandGroupPlacement.pasteboard) { Button("Select All") { selectAll() } }
That adds a second "Select All" menu item.
If I use CommandGroup(replacing: ...) then it replaces others, not just the "Select All"