mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-18 05:01:17 +02:00
Use cleaned up text content when copying into plain/text (#1865)
This commit is contained in:
committed by
Ian Storm Taylor
parent
fbd76895b5
commit
ee8bc1b695
@@ -90,7 +90,7 @@ function cloneFragment(event, value, fragment = value.fragment) {
|
|||||||
// since the result is more predictable.
|
// since the result is more predictable.
|
||||||
if (event.clipboardData && event.clipboardData.setData) {
|
if (event.clipboardData && event.clipboardData.setData) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.clipboardData.setData(TEXT, native.toString())
|
event.clipboardData.setData(TEXT, div.textContent)
|
||||||
event.clipboardData.setData(FRAGMENT, encoded)
|
event.clipboardData.setData(FRAGMENT, encoded)
|
||||||
event.clipboardData.setData(HTML, div.innerHTML)
|
event.clipboardData.setData(HTML, div.innerHTML)
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user