[Webkit-unassigned] [Bug 14350] Wordpress' WYSIWYG editor strips line breaks
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 1 17:13:11 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=14350
------- Comment #8 from justin.garcia at apple.com 2007-08-01 17:13 PDT -------
Looks like the textarea that WordPress uses to submit contains (as children)
text nodes and brs:
TEXTAREA 0x1779c6c0 CLASS=mceEditor STYLE=display: none;
#text 0x187be120 "foo"
BR 0x187be150
BR 0x187be1c0
#text 0x187be260 "bar"
BR 0x187be290
BR 0x187be300
#text 0x187be3a0 "baz"
But the value() of the textarea is "foobarbaz". I made this reduction:
<script>
function foo() {
textarea = document.getElementById("textarea");
textarea.appendChild(document.createTextNode("foo"));
textarea.appendChild(document.createElement("br"));
textarea.appendChild(document.createTextNode("bar"));
}
function bar() {
alert(textarea.value);
}
</script>
<textarea id="textarea"></textarea>
<input type="button" onclick="foo();">
<input type="button" onclick="bar();">
And it behaves the same way in FF. I don't think this is the right way to
submit the content of the editable region. This seems like a WordPress bug.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list