WordPress.org

Ready to get started?Download WordPress

Forums

Global Content Blocks
[resolved] Paragraph spacing (11 posts)

  1. rbart86
    Member
    Posted 1 year ago #

    Hi. I've used this plugin on a few projects now - its great, thanks! However, i've only ever used it on text which has been on one line, I now need to use it for a few paragraphs but its removing the p tags and therefore just putting them all as the same paragraph. Has anyone come across this before?
    Thanks in advance...

    http://wordpress.org/extend/plugins/global-content-blocks/

  2. benz1
    Member
    Plugin Author

    Posted 1 year ago #

    I just did a simple test using the following html in a global content block:

    <p>line 1</p>
    <p>line 2</p>
    <p>line 3</p>

    and it appeared correctly on the page.

    The plugin does not remove p tags. Maybe it's a setting on your editor?

  3. punchup
    Member
    Posted 1 year ago #

    I think what rbart may be saying is that if you use normal WP visual editor keystrokes like hitting Enter to create a paragraph, or Shift + Enter to create a line break, these do not function on the plugin's Tiny MCE. I am having the same issue because I would like to allow my client to use this plugin, but he knows nothing about HTML. Perhaps I'm missing something?

  4. benz1
    Member
    Plugin Author

    Posted 1 year ago #

    The visual editor in the plugin will mimic the standard post/page visual editor functionality (it uses the same function). The abiility to add content without the VE stripping out the formatting is one of the reasons I created the plugin but yes, this would require the contnet to be added in HTML mode.

    The trick I usually use inthe VE to force it to keep a line/paragraph break is to put a period (full-stop) on the line and color it the same as the background so it's not visible.

  5. vyabsley
    Member
    Posted 1 year ago #

    I have the same problem. Are there any plans in a future update to allow for the visual editor to work with line breaks / paragraphs?

  6. benz1
    Member
    Plugin Author

    Posted 1 year ago #

    This is an issue with the WP visual editor and beyond the control of the plugin. If you use the HTML/Text mode of the editor you will have no problems. If you use TinyMCE Advanced I believe there is an option to prevent the editor from stripping out breaks.

  7. trurla
    Member
    Posted 1 year ago #

    Unfortunately I've met the same problem. In text editor I added 2 paragraphs like:
    <p>line <span>1</span></p>
    <p>line 2</p>
    Went to visual editor which shows the path like Path: p, or Path: p >> span. But when I go to the text editor again, it shows

    line <span>1</span>

    line 2

    So <p> tag is missing. And it is also missing on the page where I put this code [contentblock id=1]

  8. benz1
    Member
    Plugin Author

    Posted 1 year ago #

    As per responses above this is an issue with the WP editor. If you stick to the text view and don't switch to visual while creating the content block you shouldn't have a problem.

  9. trurla
    Member
    Posted 1 year ago #

    I've just checked the other visual editor tags like list or headings or address – all of them are working, but not the paragraph. It disappears.

  10. trurla
    Member
    Posted 1 year ago #

    That works. Thank you benz1!

  11. KoenRijpstra
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags