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

"Copy template as markdown" button. #3719

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Luc-Mcgrady
Copy link
Contributor

@Luc-Mcgrady Luc-Mcgrady commented Jan 11, 2025

image

Example copied text:
Front Template

{{Front}}

Back Template

{{FrontSide}}

<hr id=answer>

{{Back}}

Styling

.card {
    font-family: arial;
    font-size: 20px;
    text-align: center;
    color: black;
    background-color: white;
}

related(?) forum post: https://forums.ankiweb.net/t/suggestion-copy-card-debug-info-button/54206/9

@Luc-Mcgrady Luc-Mcgrady changed the title Copy template as markdown button. "Copy template as markdown" button. Jan 11, 2025
@Danika-Dakika
Copy link

Sorry for hijacking your post, but I'm really excited about this now! As far as placement --

Is there a reason you put it between the existing "Deck Override" and "Browser Appearance" options, as opposed to after them?

Or could this be something that would be used frequently enough that it might merit a button in the window? [I'm raising that as a genuine question -- not a demand.] "Copy as Markdown" might look too long there, but "Copy" might be misleading if someone thought they could copy it for another purpose (like copying a template/type to another note type). Maybe "Copy for Help" and pairing it with the "Help" button on the left?
image

@Luc-Mcgrady
Copy link
Contributor Author

There's no reason I put it there it was just convenient. I'd assumed this would be a bit of a niche feature so tucked it away a little bit. That and I was trying to emulate Anki-droid's example as closely as possible.

@dae
Copy link
Member

dae commented Jan 12, 2025

Looks like a useful addition, thank you!

I think it's probably going to contribute to clutter down the bottom, so the dropdown does seem like it might be the best place. Regarding the wording, how about "Copy to Clipboard" or similar? 'Markdown' feels like it's more technical than it needs to be, as users wanting support don't need to be familiar with that technology.

@Luc-Mcgrady
Copy link
Contributor Author

I would prefer to call it "Copy to Clipboard" but noticed it was called "Copy as Markdown" in ankidroid so decieded to keep it consistant.

If i'm going to split hairs, something else i'd like to change from the ankidroid implmentation is i'd prefer:

##

Front Template

to

**
Front Template

@dae
Copy link
Member

dae commented Jan 12, 2025

As this is a debug tool, consistency is probably not of the upmost importance. Maybe @ankidroid would be interested in tweaking their wording, but they can of course keep it the same if they'd prefer.

Likewise for the formatting - no preferences on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants