blob: 7610f201ae45f0bcab1929790aae7ddf128cd03a (
plain)
1
2
3
4
5
6
7
8
9
|
<!doctype html>
<div contenteditable>abcdef</div>
<div contenteditable>abcdef</div>
<script>
document.querySelectorAll("[contenteditable]")[1].addEventListener("beforeinput", event => {
document.execCommand("insertText", false, "ABCDEF");
event.preventDefault();
});
</script>
|