Opened 15 years ago

Last modified 12 years ago

#78 closed enhancement

EnterParagraphs p tag Spacing Improvement/Exception and bug — at Version 2

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)

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

Change History (2)

comment:1 Changed 15 years ago by yermol

  • Version set to 0.1

Same test, if you set this.mozParaHandler to either 'dirty' or 'built-in' you will get this exception:

Error: [Exception... "'Permission denied to get property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://formvista.yml.com/TESTS/xinha/htmlarea.js :: anonymous :: line 1901" data: no]
Source File: http://formvista.yml.com/TESTS/xinha/htmlarea.js
Line: 1901

comment:2 Changed 15 years ago by yermol

  • Description modified (diff)
  • Owner changed from gogo to yermol
  • Summary changed from EnterParagraphs Exception and bug to EnterParagraphs p tag Spacing Improvement/Exception and bug
Note: See TracTickets for help on using tickets.