I did a powershell workaround finally
just by simple clipboard text manipulation and stroke sending to browser
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('Edge') #name of your browser
Start-Sleep -Milliseconds 100
$wshell.SendKeys('^{c}') #copy highlighted text
Start-Sleep -Milliseconds 100
$text = get-clipboard
and delect
if ( $text -match ' $' ) #detect if last character is space abd delete it
{
$text = $text.Substring(0,$text.get_Length()-1)
}
$text = [string]::join("_",($text.Split(" "))) #convert space to _
$text | set-clipboard
$wshell.SendKeys('%{l}') #evoke linkwizard
Start-Sleep -Milliseconds 100
$wshell.SendKeys('^{a}') #select & paste clipboard
Start-Sleep -Milliseconds 100
$wshell.SendKeys('^{v}')