<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Custom copy and cut does not work on iOS"
href="https://bugs.webkit.org/show_bug.cgi?id=143776#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Custom copy and cut does not work on iOS"
href="https://bugs.webkit.org/show_bug.cgi?id=143776">bug 143776</a>
from <span class="vcard"><a class="email" href="mailto:p.jasiun@cksource.com" title="Piotr Jasiun <p.jasiun@cksource.com>"> <span class="fn">Piotr Jasiun</span></a>
</span></b>
<pre>The sample code:
<html>
<head>
<title>Custom copy cut</title>
<meta charset="utf-8">
</head>
<body>
<div contenteditable="true" cols="80" id="editor" rows="10">Foo bar bom</div>
<script>
editor.addEventListener( 'copy', copyCutListener );
editor.addEventListener( 'cut', copyCutListener );
function copyCutListener( evt ) {
evt.clipboardData.setData( 'text/html', 'xxx' );
evt.clipboardData.setData( 'text/plain', 'xxx' );
evt.preventDefault();
}
</script>
</body>
</html></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>