Hello, I'm trying to modify MediaWiki so that a single linebreak in the edit box will be written as <br />. Has this been decided against for some reason? If it's possible to do easily, I'd appreciate any help. Thanks.
On Thu, Oct 28, 2004 at 04:55:23PM +0000, Jack Lutz wrote:
Hello, I'm trying to modify MediaWiki so that a single linebreak in the edit box will be written as <br />. Has this been decided against for some reason? If it's possible to do easily, I'd appreciate any help. Thanks.
It's easier to have linebreaks in the article source if you search for something specific. the reader don't care about such breaks, the editor does.
Before you waste time, add a nl2br() somewhere below line 1475 (CVS)
ciao, tom
The edit box is usually not the same size as the text displayed in a Wikipedia article.
Fred
From: Jack Lutz jack-lutz@comcast.net Reply-To: MediaWiki announcements and site admin list mediawiki-l@Wikimedia.org Date: Thu, 28 Oct 2004 16:55:23 +0000 (UTC) To: mediawiki-l@wikimedia.org Subject: [Mediawiki-l] Recognizing individual line breaks as <br />
Hello, I'm trying to modify MediaWiki so that a single linebreak in the edit box will be written as <br />. Has this been decided against for some reason? If it's possible to do easily, I'd appreciate any help. Thanks.
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
I'm not sure I follow the replies so far, they seem to assume something more complicated... It's literal line breaks, WYSIWYG. Assuming this is in the Wiki edit box: Line 1 Line 2
Then this is the default result I don't want: Line 1 Line 2
I'd rather have: Line 1 <br /> Line 2
No, not really. No WYSIWYG necessary.
In Thomas's reply, reader refered to a random passer-by, editor to someone who edits the page.
Fred's reason is probably the biggest one. If line breaks were taken litterally, the article may be as wide as the edit box (which is probably bad practice).
On Thu, 28 Oct 2004 15:01:57 -0500, Jack Lutz jack-lutz@comcast.net wrote:
I'm not sure I follow the replies so far, they seem to assume something more complicated... It's literal line breaks, WYSIWYG. Assuming this is in the Wiki edit box: Line 1 Line 2
Then this is the default result I don't want: Line 1 Line 2
I'd rather have: Line 1 <br /> Line 2
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
On Thu, Oct 28, 2004 at 04:21:25PM -0400, Jamie Bliss wrote:
No, not really. No WYSIWYG necessary.
In Thomas's reply, reader refered to a random passer-by, editor to someone who edits the page.
Fred's reason is probably the biggest one. If line breaks were taken litterally, the article may be as wide as the edit box (which is probably bad practice).
Look at the HTML docs for textarea, the default for warping in textareas is 'virtual' meaning that a long line will be warped but no \n will be sent by the browser. So, Fred's argument is more or less nonsense.
ciao, tom
On Oct 28, 2004, at 9:55 AM, Jack Lutz wrote:
I'm trying to modify MediaWiki so that a single linebreak in the edit box will be written as <br />. Has this been decided against for some reason? If it's possible to do easily, I'd appreciate any help. Thanks.
The first reason is compatibility: many older articles on Wikipedia had literal line breaks inserted in the source text, whether manually or by the older software I don't know. These are not supposed to be line breaks in output.
The second reason is... compatibility. When the allowed HTML subset is used, line breaks are common to make the markup clear, and you _really_ don't want to be adding in <br />s everywhere.
The third reason... compatibility. Line breaks at the edge of block-level constructions (paragraphs, list lines) and table rows and other such constructs also should not have <br />s added to them. Line break already has a specific block-level meaning in many such constructs (dividing list lines, table rows, etc).
So if you want \n to turn to <br /> to appear only where you want it, you'll need to be careful.
-- brion vibber (brion @ pobox.com)
mediawiki-l@lists.wikimedia.org