File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed
Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 6868 // import {subscribe} from 'https://unpkg.com/@github/paste-markdown/dist/index.esm.js'
6969 subscribe ( document . querySelector ( 'textarea' ) )
7070 </ script >
71-
72- < textarea id ="input " style ="width: 100%; height: 80px; font-family: monospace "> </ textarea >
73- < h2 id ="gg "> Hello World</ h2 >
74- < script >
75- document . getElementById ( 'input' ) . innerHTML = '<table' . repeat ( 99999 ) + '<div><table></div>'
76- // document.getElementById('input').innerHTML = '<table'.repeat(2) + '<div><table></div>'
77- gg . oncopy = e => {
78- e . preventDefault ( )
79- console . log ( '💜' , 'input.value' , input . value )
80-
81- e . clipboardData . setData ( 'text/html' , input . value )
82- e . clipboardData . setData ( 'text/plain' , 'not formatted' )
83- }
84- </ script >
85-
86- < textarea id ="good " style ="width: 100%; height: 80px; font-family: monospace "> </ textarea >
87- < h2 id ="goodg "> Hello World</ h2 >
88- < script >
89- const table =
90- '<table><tr><th>hello</th><th>there</th></tr>' +
91- [ '<tr><td>how</td><td>are</td></tr>' , '<tr><td>you</td><td>?</td></tr>' ] . join ( '/n' ) . repeat ( 99 ) +
92- '</table>'
93- document . getElementById ( 'good' ) . innerHTML = table
94- goodg . oncopy = e => {
95- e . preventDefault ( )
96-
97- e . clipboardData . setData ( 'text/html' , good . value )
98- e . clipboardData . setData ( 'text/plain' , 'not formatted' )
99- console . log ( '💜' , Array . from ( e . clipboardData . items ) )
100- }
101- </ script >
10271 </ body >
10372</ html >
You can’t perform that action at this time.
0 commit comments