Opened 13 years ago

Closed 10 years ago

#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)

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 (7)

comment:1 Changed 13 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 13 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

comment:3 Changed 12 years ago by mokhet

when the content of xinha is <p />, the javascript error obtained is

start has no property
enter-paragraph.js line 131

comment:4 Changed 12 years ago by anonymous

  • Version changed from 0.1 to yermo

I'm going to be implementing this in the Unified Backend branch. Once it's stable there we can move the patches into the trunk.

comment:5 Changed 12 years ago by gogo

  • Version changed from yermo to unified_backend

comment:6 Changed 12 years ago by gogo

  • Milestone set to 2.0
  • Priority changed from high to normal
  • Severity changed from critical to enhancement
  • Version changed from unified_backend to trunk

Moving this back into trunk @ version 2.0. Not sure how far yermo got with it.

comment:7 Changed 10 years ago by ray

  • Resolution set to wontfix
  • Status changed from new to closed

although this is an ever-recurring topic, I think there are more users who would be put off by an automatically inserted class than those types who want typewriter-style single newline

Note: See TracTickets for help on using tickets.