I need to get single line breaks back
sambtaylor - October 29, 2007 - 03:16
| Project: | Whizzywig |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | VM |
| Status: | by design |
Jump to:
Description
Thank you for making this module. One of the things I was excited about about Whizzywig, however, was that it appeared to support single line breaks in the input when I tried the demo. The Drupal module, however, outputs full paragraph breaks for every line return. I need untrained users to be able to just hit return and have a single line break inserted. It seems Whizzywig itself supports this. Can you tell me how to make the Drupal module support this, or if possible, can you make a simple option that allows you to choose/toggle/or configure this. Thank you.

#1
Drupal does do line breaks, though Drupal uses
<p></p>to do so, are you stating that you want<br />? and if so why ? what difference does it make how the break is made so long as it's made ?#2
Yes, Drupal does single line breaks, and I love that. But, I can't find a WYSIWYG text editor in Drupal that allows you to still get them. Whizzywig editor itself also allows single line breaks. But, Whizzywig as manifest in the Drupal module does not allow single line breaks. No, I don't care what the tagging is, as long as a user simply has to hit return to have a single line break appear on the screen and in the text editor.
#3
I just installed whizzywig to test out the idea that it does not cater to line breaks. Fact is On a fresh drupal install, using the FULL HTML inputer format, with the LINE BREAK filter ENABLED. it does indeed add breaks.
If you would like to test in my sandbox, let me know.
#4
matter of fact it's using
<p></p>as it should.goto administer -> input formats
click on configure next to FULL HTML
insure you have line break filter checked.
#5
#6
Sure, I'd like to test it. (Do you mean with "Line Break Converter" enabled? I tried and it doesn't work for me. At first appears to work, but as soon as I enter a third line in a row, it jumps an extra space between each line. Can you get, say, five lines in a row with single returns for example--
line 1
line 2
line 3
line 4
line 5
I can't.
#7
I can only comment from IE7 usage
every time I hit return there is a
<p>inserted in the codeuse same user and password you've been given in past to access my site.
#8
I see the tests you already did. They don't output as single line returns for me. Neither did the test I did.
#9
It is isn't a double line break, it is a
<p></p>which can be SEEN if you view the source of the page.the
<p></p>is a paragraph tag. which adds space bewteen paragraphs.Thus you DO care about which tag is used as I asked when I hopped in this.
#10
To do what you ask (now that you've made yourself clear)
goto administer -> whizzywig -> custom buttons tab
name = linebreak (don't use spaces)
tag =
<br />now users if they want a
<br />tag can click the line break button. There is no way to tie it in with the return button of a keyboard that I can see.#11
How come Drupal itself is able to tie in the return with a single line break? Why couldn't whizzywig, or any wysiwyg, output exactly as Drupal does.
(What I meant was I didn't care what the tags were as long as it outputs single line breaks, as Drupal does. And, I thought you were saying it used the same tags that Drupal did--in which case, why wouldn't it output the same. I was surprised by the implication that Drupal uses p tags to come up with single line breaks, but I thought I'd trust your greater knowledge about it). Anyway, why can't it do what Drupal does?
#12
Since our terminologies were different to start, let me return to reply directly to this. Drupal normally produces a line return the same way a typewriter or word processor was. If it does this with
tags as you say that is impressive, as usually paragraph tags cause a "double return" or a "double line break." I need a single return, as with a word processor, because I am working on a site for poetry, where users need to able to just type in lines and press return and not have new paragraph breaks. This Whizzywig module, however, and all the wysiwyg modules I have seen, make Drupal output differently than drupal normally does. It makes Drupal do a double line break. I never meant by that to imply that it inserts TWO line breaks, or two tags, but that the space formatted is equal to two line breaks. I need one line to follow right beneath the next, as Drupal normally does. And, I can't see why a wysiwyg editor, particularly one that uses the same tag system, as you say, cannot reproduce the same formatting output that Drupal normally produces.
#13
again there are two different TAGS.
<p>&
<br /><p>produces what you are calling a double line break. It is in fact a paragraph tag and produces what you are calling a double line break. In fact it is a paragraph not a double line break.<br />produces a single line break.<br /><br />would produce a double line break and as such would resemble a<p>tag.the question is, what is the output of your content producing ? view the source code after a page is rendered. Drupal as a default also produces
<p>not<br />from all of my installations. I don't see Drupal producing<br />which from your description is what you want.#14
How come if I hit return here in Drupal
and it's a p tage
it does not make a big wide paragraph break
If this were whizzywig it would make
each
return
look
like
this
#15
<p>How come if I hit return here in Drupal<br />and it's a p tage<br />
it does not make a big wide paragraph break<br />
If this were whizzywig it would make </p>
<p>each</p>
<p>return</p>
<p>look</p>
<p>like</p>
<p>this</p>
is the source of your comment as you can see, it has a
<br />inside the first<p>as line breaks in the first part of your comment then<p>in the latter part. As such your statement about it making a<p>tag and not creating extra space is incorrect.My theory is one return =
<br />2 =
<p>viewing the source of my own comment, my theory seems to test positive. As such whizzywig does not seem to support line breaks with a
<br />or your theme may not. Which theme are you using ?#16
Kenn, I was just responding to you saying that Drupal uses p tags to do line breaks and saying that Whizzy used the same method as Drupal.
But, that's not true, as you have now pointed out. Drupal does use br tags for single line returns and p tags for double. Whizzy however seems to only use p tags, even for single line returns. So, to get back to my issue that I had to begin with, I need a way to have whizzy keep the single line returns (I'd like to achieve this with any text editor; but they all seem to use p tags exclusively).
#18
The demo here: http://www.unverse.net/wysiwyg.html doesn't support the
<br />tag as a carriage return. At least it doesn't when I use it. If I remove all text on the demo, and begin to type. When return is used it doesn't produce a single line break.That being the case I don't think this is a Drupal, or Drupal module specific issue and the editor developer of whizzywig would need to take care of this situation.
#19
Please let me know if you come across any text editor in Drupal that maintains Drupals system of carriage returns (single line returns).
#20
#21
commenting out line 396 of whizzywig.js worked for me
ie- add // at the beginning of this line.
if (e && e.keyCode==13 && papa.nodeName=="BODY") makeSo("formatblock","<p>");
this leaves <br> tags instead of <p>
#22
Uehm What is the problem??
If you hit a enter a paragraph will start
If you hit Shift + enter a line brake will appear.
(tested in version 0.4)
#23
he doesn't want to have to have users hit shift enter, he wants it as druapl default does it. which is a line break rather then paragraph break
#24
ah ok, He wants to reverse the working.
It would be an nice option. Are you planning to hard code this in the module or are you making a option in the control pannel/config file?