1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding Line Break into Post

Discussion in 'XenForo Development Discussions' started by bAstimc, Mar 27, 2015.

  1. bAstimc

    bAstimc Member

    I wrote a function which saves a post using the DataWriter. Everything works fine except those added Linebreaks in the message.
    I wanted to append two line breaks and add something like "- sent with...".
    What should I add to the messagestring to save real linebreaks?
    I tried
    [br], <br> and \n
    but on the forumpost it displays that raw code instead of the linebreak.

    Any suggestions? :S
  2. Nobita.Kun

    Nobita.Kun Well-Known Member

  3. Daniel Hood

    Daniel Hood Well-Known Member

    Are you using single quote or double quote to wrap the \n? You have to use double.
  4. bAstimc

    bAstimc Member

    Thanks! It's working.

Share This Page