blob: 8b8867f75cdce36596f9b540ab6ee0929db30f93 [file] [log] [blame]
<html>
<head>
<script type="text/javascript">
function selectAndJustify()
{
if (window.testRunner)
testRunner.dumpAsText();
var elem = document.getElementById("test");
var selection = window.getSelection();
selection.setBaseAndExtent(elem, 2, elem, 6);
document.execCommand('JustifyCenter', false, null);
}
</script>
</head>
<body>
<span id="test" contenteditable="true" >
Line 1.
<br>
<b>Select all text in this line and use justify command.</b>
<br>
Line 3.
</span>
</body>
<script>
selectAndJustify();
</script>
</html>