You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bring back copy Markdown to clipboard functionality
This was enabled by default, but didn't work perfectly for our
use-cases. This brings it back in off-by-default mode so it can be
enabled and experimented with.
Basically undoes 550e43a
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,12 +30,15 @@ This sets up a keyboard event handler so that selecting any text within `.my-quo
30
30
```js
31
31
install(element, {
32
32
quoteMarkdown:true,
33
+
copyMarkdown:false,
33
34
scopeSelector:'.comment-body'
34
35
})
35
36
```
36
37
37
38
The optional `scopeSelector` parameter ensures that even if the user selection bleeds outside of the scoped element, the quoted portion will always be contained inside the scope. This is useful to avoid accidentally quoting parts of the UI that might be interspersed between quotable content.
38
39
40
+
In `copyMarkdown: true` mode, the browser clipboard copy action is intercepted for user selections within `element` and the Markdown representation of the content is placed on clipboard under the `text/x-gfm` MIME-type.
41
+
39
42
## Events
40
43
41
44
*`quote-selection-markdown` (bubbles: true, cancelable: false) - fired on the quote region to optionally inject custom syntax into the `fragment` element in `quoteMarkdown: true` mode
0 commit comments