st3v3nmw / obsidian-spaced-repetition

Fight the forgetting curve by reviewing flashcards & entire notes on Obsidian
https://www.stephenmwangi.com/obsidian-spaced-repetition/
MIT License
1.53k stars 184 forks source link

[FEAT] Support using the mouse to select text when reviewing in flashcards. #449

Closed linanwx closed 2 years ago

linanwx commented 2 years ago

I like this plug-in very much. Thank the author for developing this plugin. I am using this plugin to learn English. I'm always frustrated when I don't know the pronunciation of words or sentences. Now there are many TTS software that allows you to hear the pronunciation through the mouse. But I can't do this because I can't select words in the flashcards interface. So, is there any way for me to select words through the mouse?

linanwx commented 2 years ago

I now know how to make it work. Edit this file Your workspace - Obsidian/plugins/obsidian-spaced-repetition/styles.css Make sure the following code block adds these.

#sr-flashcard-view {
    overflow-y: auto;
    height: 80%;

    -webkit-user-select:text;
    -moz-user-select:text;
    -ms-user-select:text;
    user-select:text;
}

This will allow those texts in flashcards to be selectable.

brandonhorst commented 2 years ago

You can also do this with a CSS Snippet, so you don't need to tweak the plugin code and it won't get clobbered on updates. Just a snippet like:

#sr-flashcard-view {
        user-select: text
}
linanwx commented 2 years ago

You can also do this with a CSS Snippet, so you don't need to tweak the plugin code and it won't get clobbered on updates. Just a snippet like:

#sr-flashcard-view {
        user-select: text
}

That appears to be a better way. I tried and it work. Thanks.