Regarding the editor

Discussion in 'Feedback' started by Denny Crane, Jul 6, 2007.

  1. Denny Crane

    Denny Crane It's not even loaded! Staff Member Administrator

    Joined:
    May 24, 2007
    Messages:
    72,957
    Likes Received:
    10,620
    Trophy Points:
    113
    Occupation:
    Never lost a case
    Location:
    Boston Legal
    One request has been to make the editor insert br tags instead of p tags when you hit return. I looked at doing it, actually did do it, then took it out. Here's why:</p>
    1. When you hit "enter" you really are starting a new paragraph most of the time
    2. P tags can be customized with css
    3. When you copy & paste from another site, you want to preserve their formatting of paragraphs, and not have
      replacing their P tags.

    #3 is the biggie for me. #1 saves you a keystroke as you would otherwise have to hit enter twice to make new paragraphs. </p>

    From the moxicode (they wrote the editor) WWW site:</p>

    Here is a few reasons why BR elements and the force_br_newlines isn't enabled by default. </p>
    1. Paragraphs where invented for a reason. Try modifying paragraph margins without them using CSS and you see what I mean.
    2. Popular word processors use Paragraphs instead of BR unless you use shift+enter/return. So users are more familiar using paragraphs.
    3. The IE WYSIWYG environment is build in handling paragraphs when it comes to alignment/list management and much more. And TinyMCE and other editors will start producing lots of strange bugs etc etc if you enable the option.
    4. The space between the Paragraphs can be removed using a simple CSS trick like this. p {margin:0; padding: 0;} the same can not be done for BR elements since the whole line is not wrapped in a container. So P elements gives you the flexibility to choose.
    5. If you really must have Paragraphs for some reason like for example to interface with Flash or send e-mail messages simply post process away them by replacing

      with nothing and </p> with
      . The same process but from BR tags to P tags can not be done since you don't have a reference for the start element.
    6. Paragraphs are makes more semantically correct XHTML markup, and we are trying to make a XHTML editor not a old HTML editor.
    7. Paragraphs are mostly more valid containers for text in a W3C strict environment since plain text nodes are not allowed in all containers.
    8. BR elements might even be deprecated in the future and replace with a more suitable element. See the XHTML 2.0 draft. for details.
    9. <font color="#ff0000"> BR elements can still be produced if you really need one at a specific place for some reason using Shift+Enter/Return this is exactly the same behavior popular Word processors have.</font>
    10. I have never seen one single valid reason why paragraphs must be used unless it's for a e-mail software or for integration with Flash and both these can and should be solved with post processing if you want the user to be able to modify the contents again with TinyMCE. If you have a good reason please drop us a e-mail describing it and I will put it on my exceptions list.

    All of these reasons may seem technical, but they are technically correct and for the right reasons.</p>

    <font color="#ff0000">The editor does let you inserttags when you really need them. Hit SHIFT-ENTER to get those
    tags.
    </font></p>

    Get used to doing that. The alternative is pretty horrible; some of you may have experienced a broken editor on a popular sports site that I post on (drives me nuts).</p>

    </p>
     

Share This Page