Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
<script>
window.onload = () => {
const font = document.querySelector("font");
// For emulating traditional behavior, collapse Selection to end of the
// text node in the <font>.
getSelection().collapse(font.lastChild, font.lastChild.length);
const meta = document.querySelector("meta");
meta.style.setProperty(
"text-decoration",
"overline underline line-through"
);
meta.appendChild(font);
document.execCommand("selectAll");
getSelection().extend(meta, 0);
document.execCommand("underline");
}
</script>
<ins contenteditable>
a
<meta></meta>
<font>
</font></ins></body>