Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
"use strict";
document.addEventListener("DOMContentLoaded", () => {
const dl = document.createElement("dl");
const dd = document.createElement("dd");
const p = document.createElement("p");
dd.appendChild(p);
dl.appendChild(dd);
document.documentElement.appendChild(dl);
dl.contentEditable = true;
getSelection().collapse(p, 0);
document.execCommand("insertParagraph");
}, {once: true});
</script>
</head>
<body></body>
</html>