Is there a way to insert custom Commands into a system CommandGroup like .pasteboard? I need to insert a new Command but I don't want to replace the whole group.
SwiftUI: How to insert custom Commands inside .pasteboard CommandGroup
There is a "before" and "after" parameter that could be used, such as:
Code Block @main struct TestApp: App { var body: some Scene { WindowGroup { ContentView() }.commands { CommandGroup(after: .pasteboard) { // in Edit Button(action: { // do something }) { Text("My_Menu_Item") } } } } }
Yes I know about that but is not what I'm looking for, I'm trying to insert a new custom Command inside this .pasteboard CommandGroup.
Something like:
Cut
Copy
> Copy As // New custom command
Paste
Something like:
Cut
Copy
> Copy As // New custom command
Paste