How do I create Edit Action Menus in SwiftUI on macOS?

Various TextField and TextView elements of Apple apps have text edit actions for text correction, but also auto completion.

How can I create such a menu for a TextField in SwiftUI on macOS? the textCompletion modifier did not result in this menu.

Many thanks in advance!

Jan

How do I create Edit Action Menus in SwiftUI on macOS?
 
 
Q