22 lines
601 B
HTML
22 lines
601 B
HTML
<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>
|