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
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,25 @@ Some `<table>`s are not meant to be pasted as markdown; for example, a file cont
44
44
</table>
45
45
```
46
46
47
+
### Granular control for pasting as plain text
48
+
49
+
If you're wanting more granular support of pasting certain items as plain text by default, you can pass in the controls config at the `subscribe` level.
50
+
51
+
Our config support looks as follows:
52
+
53
+
```js
54
+
import {subscribe} from'@github/paste-markdown'
55
+
56
+
// Subscribe the behavior to the textarea with pasting URL links as plain text by default.
In this scenario above, pasting a URL over selected text will paste as plain text by default, but pasting a table will still paste as markdown by default.
61
+
62
+
Only the `urlLinks` param is currently supported.
63
+
64
+
If there is no config passed in, or attributes missing, this will always default to `false`, being the existing behavior.
0 commit comments