Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
"use strict";
addEventListener("load", () => {
const editingHost = document.querySelector("div[contenteditable]");
getSelection().selectAllChildren(editingHost);
document.execCommand(
"insertHTML",
false,
'<ruby contenteditable="false"><rt>annotation</rt>base</ruby>'
);
}, {once: true});
</script>
</head>
<body>
<div contenteditable>text content</div>
</body>
</html>