Hello, beautiful nerds!
I’m wanting to extract html from selected text in a web browser to my clipboard using an Automator service. I’m assuming this would require an AppleScript? Any help would be greatly appreciated!
Many thanks!
Hello, beautiful nerds!
I’m wanting to extract html from selected text in a web browser to my clipboard using an Automator service. I’m assuming this would require an AppleScript? Any help would be greatly appreciated!
Many thanks!
You can use both Automator as well as Applescript for this, but the Automator route is the easiest and fastest way.
Save the workflow - now you’re able to run it from the Services menu.
I recommend assigning it a keyboard shortcut in System Preferences
Thanks! Do you know a way to copy the background HTML as you copy it to the clipboard from a web browser?
You’ll probably need JavaScript to read from the DOM - see https://stackoverflow.com/questions/1335252/how-can-i-get-the-dom-element-which-contains-the-current-selection
There was a Firefox extension that used to do this but it no longer works.
I think the underlying html could be a bit involved for a copy-paste from what you’re presented as a user. You could try the developer menu.
Thanks, all! @JohnAtl, I think that’s probably the best option for me at this point. Thanks again.