24 lines
747 B
HTML
24 lines
747 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
<div id="test" contenteditable="true">
|
|
<font color="#1b6f11">
|
|
<span id="textSpan" style="background-color: rgb(191,35,28);">Foo</span></font><br><br>
|
|
</div>
|
|
|
|
<script src="../../resources/dump-as-markup.js"></script>
|
|
<script>
|
|
|
|
Markup.description('This test checks behaviour of insertParagraph method.\n'+
|
|
'The style and the font should be preserved in new line of text - the "Bar" should be green and have red background.\n');
|
|
var container = document.getElementById('test');
|
|
var textSpan = document.getElementById('textSpan');
|
|
window.getSelection().setPosition(textSpan, 1);
|
|
document.execCommand("InsertParagraph");
|
|
document.execCommand("InsertText", false, "Bar");
|
|
Markup.dump(container);
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|