Support » Fixing WordPress » [Plugin: Custom Field Template] Line breaks in TinyMCE

  • aicos


    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.


Viewing 8 replies - 1 through 8 (of 8 total)
  • proximity2008


    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.


    Hiroaki Miyashita


    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.

    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.

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

    Perfect, thanks

    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 />

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

    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?


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Custom Field Template] Line breaks in TinyMCE’ is closed to new replies.