Single Line Breaks (Please!!)
sambtaylor - October 25, 2007 - 15:18
| Project: | TinyMCE |
| Version: | 5.x-1.9 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I am really struggling to find a way to have Tiny MCE reproduce Drupal's built in structure of outputting single line breaks for single line returns. I absolutely need this function. I have read everything I can find on the subject and all I can manage to get is either paragraph returns or no breaks at all with any of the proposed solutions.
Many are absolutely contemptuous of single line breaks, but trust us, there are many who really need them. It is wonderful that Drupal preserves them. Can we find a easy way to make TinyMCE module have configurable settings, perhaps in conjection with input filters, to do the same thing?

#1
To clarify, if you hit shift-return in the TinyMCE editor window a
<br />HTML tag is inserted (single line break). This is common practice in many rich text editors, including the evil and reviled MS Word.Is this the type of functionality you are looking for or do I not understand the problem?
#2
Well, I actually tried that, and it did not work. But, regardless, that's really not what I need, because I need users to be able to type normally and not know or have to do a trick like that.
#3
I ran into a similar problem:
What I want tinymce to do, too, is to respect the drupal filter. With this example of line/paragraph breaks: If you have the plain text field you hit return once to get a line break and hit return twice to get a paragraph break, as you would do on a typewriter (in this situation I'm not interested in what other text processors do). Many users are used to do this (if they weren't there would be no need to have an autoformat for word to transform two paragraph breaks into one).
When I use tinymce (with default html filter) I get another behavior: when you hit control-return tinymce behind the scenes enters a <br /> (though this will be filtered out by drupal) and a line break (which will be replaced by <br /> when drupal outputs the contents). When you hit return alone, tinymce behind the scenes enters a line break, a <p> tag (which will be filtered out by drupal) and another line break and a closing </p> and a line break. As the tags will be filtered out only line breaks (at least two) will be left and converted into <p> and </p> tags in the drupal output.
And now comes the clou: one user doesn't use tinymce, the other does. The first user enters his text with line and paragraph breaks (i.e. return for line break, double return for paragraph break). The output looks ok. Then the second user with tinymce edits the text and in tinymce all looks like one flowing text.
On the other hand I want to provide users with the ability to easily enter style formatting to their content without having to struggle about html tags. This is, what tinymce can be used for. They should be able to switch between rich text editing and plain text editing (seeing style html tags then, of course).
#4
subscribing. was also wondering about having the same functionality.
#5
subscribing: I too was wondering about this same functionality and agree users need to be able to type normally.
#6
subscribing
#7
This sounds more like an issue with TinyMCE than any module supporting it. Has anyone tried asking about this on the TinyMCE forums to see if this can be configured correctly? If so, it should be documented somewhere and made part of some sort of default implementation. I've been battling with the same issue for for a long time, now that I think about it.