Forums

Insert empty lines in edtior (26 posts)

  1. shmk
    Member
    Posted 1 year ago #

    I'm trying to spacing objects in a page using new lines, but the editor strip them.
    I've tried directly in html to add
    or <p></p> but these are all removed when you do a Visual->HTML->Visual.

    Is there a mode to don't let the editor to remove empty paragraph or new lines?

  2. Mark / t31os
    Moderator
    Posted 1 year ago #

    Try <p>&nbsp;</p> instead (just a suggestion, i don't have such issues myself).

  3. shmk
    Member
    Posted 1 year ago #

    No, <p>&nbsp;</p> it's stripped too.

    Any other solution?

    Because the editor has to be used by people who thinks that HTML is a new type of mobile phone, if is there a non-HTML method will be better...

  4. Mark / t31os
    Moderator
    Posted 1 year ago #

    Shift + Enter?

  5. shmk
    Member
    Posted 1 year ago #

    It enters a
    instead of a paragraph but when I click publish or change the visualization they're removed :(

  6. Mark / t31os
    Moderator
    Posted 1 year ago #

    Beats me, i don't have these problems myself.

    Maybe an option would be to disable the HTML tab? (Could be extended to apply to particular roles)
    http://wpengineer.com/disable-html-editor-wordpress/

  7. shmk
    Member
    Posted 1 year ago #

    You dont' have these problems because you don't have to space paragraphs and objects inside a page or because your editor doesn't remove br and empty paragraphs?

  8. Mark / t31os
    Moderator
    Posted 1 year ago #

    I may not use content in the same way, i use the editor mainly for text based articles with the odd image here and there, but i don't have any spacing issues, and i do switch between HTML and Visual several times during writing.

    I use WordPress.com for my blog, which also runs WP 3.x code (same code as i run locally), where i also do not have these problems.

    You probably have a much wider use for the editor overall than i do, so it doesn't surpise me you have some problems with the editor (it's not perfect - no such thing).

    If you'd like to give me some sample content to plonk into a post that i can use to replicate the issue described i'll happily go test it for you, and if i can replicate the problem i'll see if i can find a work-around (no promises, but i can give it a shot).

  9. shmk
    Member
    Posted 1 year ago #

    I'm not doing anything "special" :D

    Here's the easier example ever:

    Text<br />
    <br />
    <br />
    <br />
    Text

    WordPress editor removes/strip/ignore the various BRs under the first one.

    It's not a "perfect/correct/fair" method for spacing, but for the final users (that usually has only a basic knowledge of word processing software) this is the only method he could use to space objects in a page/post.

  10. Mark / t31os
    Moderator
    Posted 1 year ago #

    So these users have problems just using the regular Return/Enter new line? (ie. if they use that and switch between Visual->HTML then lose these new lines).

    If these users are working in Visual Mode, they'd not see any HTML such as that above, or was that code a sample for me to play with? You said example (i'm just not sure what it's an example of - is it what you currently use for spacing?).

  11. shmk
    Member
    Posted 1 year ago #

    That example is if you want to use the HTML,
    by the way the users mainly uses the Visual mode.

    If you want to test it in Visual mode you could simply try to write down some text, insert various ENTER and/or SHIFT+ENTER, write down some other text and then publish/update the page.

    All the "surplus" newlines will be removed by the wordpress editor.

  12. Mark / t31os
    Moderator
    Posted 1 year ago #

    Will give this a try when back at the other PC.

    In the mean time, does you theme have the necessary margins applied for spacing paragraphs, that's typically how it's done, with any actual line breaks being additional to the paragraph spacing.

    If you can provide a link to a page with content where you have this issue i can check if the theme is spacing out the paragraphs (only take a moment).

  13. shmk
    Member
    Posted 1 year ago #

    Anyone has found a solution for avoiding wordpress to automatically strip "surplus" new lines?

  14. Mauseherz
    Member
    Posted 1 year ago #

    you can "help" yourself perhaps with the right css-settings.

    just set (you can do this in html-editor)

    <p class="blubb">text1</p>
    <p class="bla">text2</p>

    and in your css-file

    .blubb {margin-bottom: 2em;}
  15. shmk
    Member
    Posted 1 year ago #

    I need to found a solution that doesn't use HTML, because this "new lines spacing" is used by final users that know just the basic commands of a easy software like Words.

  16. shmk
    Member
    Posted 1 year ago #

    The only partial solution I've found, that it's easy to understand for a customer, is to use a HR to do vertical spacing.

    I've added the HR button to wordpress tinymce and I've made the HR invisible on the frontend, but as you can see is not a very good solution...

    Anyone has found a better way to let non-html users spacing the content in a page?

  17. jjw_uk
    Member
    Posted 1 year ago #

    I'm new to all this, but just messing around I found that
    <br> </br>
    seemed to work for me.

  18. Running Bum
    Member
    Posted 1 year ago #

    shmk,

    I have been dealing with this for months. I still have not found a good solution. Has anybody found a good way to insert empty lines?

    jjw_uk, I have tried <br> </br> and it works when I go back into Visual from HTML but if I go back into HTML the editor strips the
    </br> out and it moves my empty lines up.

    shmk, a really lame solution I invented (but works for me) is to make a dash mark (or any symbol for that matter) and then turn it white. This only works if you have a white background behind your text. So if I want 6 empty lines I will make a white symbol, enter, white symbol, enter... etc. 6 times.

  19. obscure
    Member
    Posted 1 year ago #

    I have never noticed this before but now you mention it it is stupid. If the user adds a line it is because they want it. Why would the editor decide that you don't really want it and remove it. That is the sort of dumb thing Microsoft software does.

  20. harpster
    Member
    Posted 1 year ago #

    I agree it is annoying... however you can do this and it works great. Change the height as needed.

    <br style=”height:4em” />

  21. shmk
    Member
    Posted 1 year ago #

    Thanks for the tip harpster but I need a solution for people that doesn't know HMTL at all, so a solution for the "Visual" part of the editor ;)

  22. harpster
    Member
    Posted 1 year ago #

    I haven't tried the TinyMCE Advanced Plugin but check out this link - maybe that will work for you. http://rubayathasan.com/wordpress/plugin/enabling-line-break-in-wordpress/

    I'm still researching this and I think a good way to solve this is to have TinyMCE put in the <br style=”height:4em” /> in place of a normal
    . Alternatively maybe a css style can be added to the editor to force that styled
    tag. If find something that works I'll post back. -A

  23. shmk
    Member
    Posted 1 year ago #

    Where is the wordpress site page where we could ask for new features? ...

  24. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Try posting in the Requests & Feedback forum.

  25. natolie
    Member
    Posted 1 year ago #

    Hi all,
    I have tried lots of things so far and all I can state is:
    1) the problem of spacing is somehow related to the presence of images;
    2) different solutions respond differently maybe depending on what plugins are loaded in the site.

    The following attempts did work for me in some instances:

    1) Using the TinyMCE Advanced editor plugin and selecting the option "Stop removing the <p> and
    tags when saving and show them in the HTML editor" in the preferences;

    2) In the editor with Html mode on manually inserting "<br class="spacer_" />"

    Hope it helps.

  26. EricGibson
    Member
    Posted 1 year ago #

    If what you're looknig to do is mainly add more space between paragraphs, I found this helpful:

    Space between para's:

    <div style="margin-top: 125px;">
    Paragraph content goes here.
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic