Ticket #78 (closed enhancement: wontfix)

Opened 8 years ago

Last modified 5 years ago

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

Change History

Changed 8 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

Changed 8 years ago by yermol

  • owner changed from gogo to yermol
  • description modified (diff)
  • summary changed from EnterParagraphs Exception and bug to EnterParagraphs p tag Spacing Improvement/Exception and bug

Changed 8 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

Changed 8 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.

Changed 8 years ago by gogo

  • version changed from yermo to unified_backend

Changed 8 years ago by gogo

  • priority changed from high to normal
  • version changed from unified_backend to trunk
  • severity changed from critical to enhancement
  • milestone set to 2.0

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

Changed 5 years ago by ray

  • status changed from new to closed
  • resolution set to wontfix

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.