My suggestion was that rather than doing something so low level in the composer, “simply” modify the oneboxing subsystem so it formats inet://
links just like https://
links.
Specifically I’m referring to the way it formats inline like so: Dark/Light Mode Toggle - #20 by jordan-vidrine
All I had to do was paste the link, Discourse looked at the target and created a nice linked title for me from the og tags.
This of course assumes your organisation has control over the og tags on the target linked pages.