Support » Plugin: Carbon Fields » Line-break and shortcode on rich editor

  • Resolved esirop

    (@esirop)


    Hello,

    First of all, this tool is trully great. Good job !

    Even if this is a great plugin, i have some kind of issue but i’m not really sure.

    It seems the tinyMCE doesn’t saves line break for the display. It’s a little weird.
    If i put a br on the text editor, it’s okay for the display, but when i’m going back in the editor, tinyMCE launch on Visual and erase the code.

    I also tried to use a shortcode to generate a br, but shortcode doesn’t works on rich editor.

    For my project, i can use a simple textarea, so it does not really matters to me.
    I’m just hoping this feedback enables you to improve this great tool.

    Cheers,
    Eric

    https://wordpress.org/plugins/carbon-fields/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author htmlBurger

    (@htmlburger)

    Hi Eric,

    We’re unable to reproduce this issue.

    But we really want to help you, so can you please send us a screencast of it, so we can assist you with fixing it?

    Thanks in advance.

    Thread Starter esirop

    (@esirop)

    Sure.

    What i put in editor in a first place :
    http://i.imgur.com/gPl1aaC.png

    Result :
    http://i.imgur.com/B3U6nhS.png

    If i go for Text editor like this :
    http://i.imgur.com/9ikgoEo.png

    Result :
    http://i.imgur.com/8XzKBFs

    Even if the display is correct (except for shortcode), the refresh in the admin gave me this :
    http://i.imgur.com/4dgGPCH.png

    It looks like Carbon Rich text is launched by default in Visual, and erase the HTML.
    I assume it’s normal because the basic editor is working the same way (erase HTML when going for Visual).
    However, the classic editor saves the last state (visual or text) and display correclty on page load.

    Thank you for your help and your time.

    Plugin Author htmlBurger

    (@htmlburger)

    Hey Eric,

    The data from Carbon Fields is returned in raw format, so developers can handle it in their preferred way. This means you should prepare it for displaying.

    So, instead of just:

    echo carbon_get_the_post_meta('content');

    you should use the following:

    echo apply_filters( 'the_content', carbon_get_post_meta( get_the_ID(), 'content' ) );

    Please, let us know if you’re having further issues.

    Thread Starter esirop

    (@esirop)

    It’s perfect, thank you.

    So clearly, this is the most powerfull plugin for custom fields. 😉

    However, I think the documentation is a little bit difficult for someone who doesn’t have ninja skill in wordpress or php.
    It takes me time to find a way to display things at first.
    For example, I found how to display thanks to carbonfields.net homepage, on “Data Retrieval”.

    In any case, I already recommend your plugin. 😉

    Anyway, thank you for your time, your fast response and your great plugin.
    Problem solved!

    Plugin Author htmlBurger

    (@htmlburger)

    Hi Eric,

    We’re constantly working on improving the documentation. Such support tickets are helping us in finding out what we need to fix and polish. So thank you 🙂

    And good luck with your project 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Line-break and shortcode on rich editor’ is closed to new replies.