Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block quote output should contain any selected images #4

Closed
wheelercj opened this issue May 7, 2024 · 0 comments
Closed

Block quote output should contain any selected images #4

wheelercj opened this issue May 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@wheelercj
Copy link
Collaborator

wheelercj commented May 7, 2024

Currently, Stardown's "Copy markdown of selection" option cannot copy images with the setting "when creating markdown of a selection, create a block quote and a page title link".

Selecting text and an image, right-clicking the text, and choosing the copy option puts into the clipboard a markdown block quote containing the selected text and the image's alt text, but not the image.

Below is an example showing what was selected and then the markdown it resulted in.

image

Math Empathy Checklist

I use the ADEPT method to remind me of what helps me learn: an Analogy, Diagram, Example, Plain English, Technical Definition.

adept method

But when sharing a math idea, I have a different mental checklist.

Empathy-Driven Mathematics – BetterExplained

The image is gone but its alt text remains.

It would be better to have a link to the image rather than just its alt text. The result should be:

Math Empathy Checklist

I use the ADEPT method to remind me of what helps me learn: an Analogy, Diagram, Example, Plain English, Technical Definition.

adept-method.png.webp

But when sharing a math idea, I have a different mental checklist.

Empathy-Driven Mathematics – BetterExplained

Which contains the markdown image ![adept-method.png.webp](https://betterexplained.com/wp-content/webp-express/webp-images/uploads/adept/adept-method.png.webp).

Stardown gets selected content using the window.getSelection function, which returns a selection object. This object can probably also be used to get the URLs and alt texts of images. To implement this feature, Stardown will need to traverse the HTML of the selection, find all images, and get their URLs and alt texts.

@wheelercj wheelercj added the enhancement New feature or request label May 7, 2024
@wheelercj wheelercj changed the title Copy selected images with Stardown's right-click copy option Block quote output should contain any selected images May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant