You need to enable NSExtensionActivationSupportsWebURLWithMaxCount to make the extension available in Safari.
When you create a target extension template other than the UI, an Action.js file is automatically created from the template. Edit the file to send the selected text using
document.getSelection().toString()
honcheng
source share