A bookmarklet is probably not the best way to implement this functionality. Perhaps this feature could be added to an extension like MarkDownload. Maybe there are other extensions out there that do what you’re looking for. This Bento app seems like it should be compatible with Obsidian since it outputs markdown, but looks like it’s only for Android.