WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Custom Field Template] Line breaks in TinyMCE (9 posts)

  1. aicos
    Member
    Posted 5 years ago #

    Hello Hiroaki

    Very handy plugin. But there is just one thing that doesn't seem to be working properly. I don't know if its just me, but I can't seem to get fields I create as RTEs to save line breaks or paragraph breaks when I press enter. They just get saved as the text version of new-lines or the "\n".

    If no one else has experienced this, I would be quite surprised. I tested on two separate installations and also disabled all other plugins.

    Thanks
    Nigel

  2. proximity2008
    Member
    Posted 5 years ago #

    Hi Nigel,

    Yeah I searched for about 2 hours trying to find a workaround with this.

    I did not succeed. In my situation I was forced to reuse the main text editor as that keeps line breaks. I would love to know the workaround.

    Simon.

  3. Hiroaki Miyashita
    Member
    Posted 5 years ago #

    I released the version 0.6 to fix the line break bug. I did not notice this bug until you told me. Thanks. I hope this will work properly.

  4. sccr410
    Member
    Posted 5 years ago #

    I have this same problem and I am using 0.7 -- how can I get line breaks to show up when using TinyMCE? I am trying to output the meta data in my theme, not through shortcodes.

  5. Hiroaki Miyashita
    Member
    Posted 5 years ago #

    Have you checked Use wpautop function in the setting page? It will automatically add p and br tags in your custom fields.

  6. sccr410
    Member
    Posted 5 years ago #

    Perfect, thanks

  7. joesmalley
    Member
    Posted 5 years ago #

    I have enabled the 'wpautop function' which has fixed this. However with this enabled, when I leave a field blank and publish the page, it saves the field not as blank, but as <br /> with a line break afterwards. This is very annoying for checking whether a custom field is blank or not, as I can't just use this:
    if(get_post_meta($post->ID, 'Key', true) != "")

    I now have to use something like this:

    if(get_post_meta($post->ID, 'Key', true) != "" && get_post_meta($post->ID, 'Key', true) != "<br />
    ")
  8. Hiroaki Miyashita
    Member
    Posted 5 years ago #

    Hi joesmalley,
    I think I fixed this bug in the new release of 0.7.3. Please try it out.

  9. css_wizard
    Member
    Posted 4 years ago #

    I am using WP 2.7.1 with your plugin ver # 1.2 and I can't seem to get line breaks. It simply echos out everything with no p tags. I have tried it with the wpautop on and off, and it still doesn't work. Any ideas?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic