Ticket #325 (closed defect: fixed)
Empty paragraphs (<p /> ) not shown in wysiwyg (IE)
| Reported by: | niko | Owned by: | gogo |
|---|---|---|---|
| Priority: | high | Milestone: | Version 1.0 |
| Component: | Xinha Core | Version: | trunk |
| Severity: | critical | Keywords: | <p /> ie empty paragraph space hidden |
| Cc: |
Description
insert a empty paragraph, switch into html-view and back and the empty paragraph won't be shown anymore, although its still in the html-code.
<p>asdf</p> <p /> <p>asdf</p>
it is caused by the <p /> (<p /> is not visible - even on a test-html-page!)
i think this is caused by getHTMLWrapper, i did some debugging in there. as some kind of a workaround this works for me:
--- htmlarea.js (Revision 223)
+++ htmlarea.js (Arbeitskopie)
@@ -4665,7 +4665,14 @@
html += " " + name + '="' + HTMLArea.htmlEncode(value) + '"';
}
if (html != "") {
- html += closed ? " />" : ">";
+ if(closed && root_tag=="p") {
+ //never use <p /> as empty paragraphs won't be visible
+ html += "> </p>";
+ } else if(closed) {
+ html += " />";
+ } else {
+ html += ">";
+ }
}
}
var containsBlock = false;
although it doesn't solve the real problem.
please review this patch, and report if you have the same problems too.
Change History
Note: See
TracTickets for help on using
tickets.
