blob: 37b9c5889cb1a6073dcfb10aad6c549ba5bc41ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<html>
<head>
<script>
function start () {
const italic = document.createElementNS('http://www.w3.org/1999/xhtml', 'i')
italic.dir = ''
document.documentElement.contentEditable = 'true'
const selection = document.getSelection()
const range = selection.getRangeAt(0)
const attribute = italic.attributes.getNamedItem('dir')
range.setEnd(attribute, (2361162229 % attribute.childNodes))
document.queryCommandState('heading')
}
document.addEventListener('DOMContentLoaded', start)
</script>
</head>
</html>
|