// Collapse selection at the end of the first text node.
window.getSelection().collapse(editor.firstChild.firstChild, 3);
// Then, typing Enter should insert <br> for <div> container.
// This is necessary for backward compatibility. When we change default
// value of "defaultParagraphSeparator" to "div" or "p", it may be possible
// to remove this hack.
synthesizeKey("KEY_Enter");
is(editor.innerHTML, "
abc
def", "Enter key press at end of a text node followed by a visible shouldn't split
container when defaultParagraphSeparator is 'br'");
// Check also the case of <p> as container.
editor.innerHTML = "
abc
def";
// Collapse selection at the end of the first text node.
window.getSelection().collapse(editor.firstChild.firstChild, 3);
// Then, typing Enter should splitting <p> container and remove the visible
// <br> element next to the caret position.
// This is not consistent with <div> container, but this is better behavior
// and keep using this behavior.
synthesizeKey("KEY_Enter");
is(editor.innerHTML, "
abc
def", "Enter key press at end of a text node followed by a visible should split
container and remove the visible when defaultParagraphSeparator is 'br'"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.