Ticket #78 (closed enhancement: wontfix)
EnterParagraphs p tag Spacing Improvement/Exception and bug
| Reported by: | yermol | Owned by: | yermol |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0 |
| Component: | Xinha Core | Version: | trunk |
| Severity: | normal | Keywords: | |
| Cc: | yml@… |
Description (last modified by yermol) (diff)
Implement the design in EnterParagraphs suggested by Gogo to include a style sheet on the <p> tags when you want a single newline.
So when you hit enter once you get a
<p class="singleNewLine">some text</p.
and then when you hit enter again it crawls back and changes the previous tag to
<p>some text</p>
There are some complicating factors to make sure it comes out right but this is a probably a much better solution than the <br> tag that the 'built-in' method uses.
Also while we're at it we need to fix the bug:
Using today's nighly build (2005-03-19) in FireFox?, load the full_example.html sample.
View source. Clear all text from the editor. Go back to WYSIWYG mode.
Enter this is a test.
highlight.
link to /test.html
click at end of link.
press enter.
The source will now be:
<p><a href="http://xinha.gogo.co.nz/test.html">this is a test</a></p><p><a href="http://xinha.gogo.co.nz/test.html"></a></p>
and the cursor will disappear. Notice the double link. In addition you will get the following exception:
Error: [Exception... "Could not convert JavaScript? argument arg 0 [nsISelection.collapse]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://xinha.gogo.co.nz/xinha-nightly/plugins/EnterParagraphs/enter-paragraphs.js :: anonymous :: line 256" data: no] Source File: http://xinha.gogo.co.nz/xinha-nightly/plugins/EnterParagraphs/enter-paragraphs.js Line: 256
