Editor.singleLine.pasteNewlines
From MozillaZine Knowledge Base
Jump to navigationJump to search
Background
Single-line text fields do not allow users to input newlines. Pasting content, however, poses a problem: what happens if pasted content contains newlines? This is often handled differently on different platforms. This preference determines what happens to multi-line content when it is pasted into a single-line text field. The area for email addresses is affected by this preference. Changes are valid only for succeeding windows.
Possible values and their effects
0
Paste content intact (include newlines)
1
Paste the content up to (but not including) the first newline (Default prior to Firefox 3)
2
Replace each newline with a space (Default in Firefox 3)
3
Remove all newlines from content
4
Replace each newline with a comma
5
Remove all newlines and surrounding whitespace
Caveats
- A value of 4 only has an effect in Mozilla products released after 2004-01-29.
- A value of 5 only has an effect in Mozilla products released after 2005-12-20.
First checked in
Has an effect in
- Mozilla Suite (all versions since M18)
- Mozilla Firefox (all versions)
- SeaMonkey (all versions)
- Mozilla Thunderbird (all versions)
Related bugs
- Bug 23485 - browser window should strip newlines from url pastes
- Bug 50935 - Multiline paste in text field should be switchable
- Bug 229203 - Need ability to convert new lines into commas for paste into single line text box
- Bug 253481 - xul:textbox attribute to specify what happens to pasted line breaks
- Bug 406062 - set editor.singleLine.pasteNewlines to 2