omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Newline in textview

    Pythonista
    2
    3
    2182
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • robertiii
      robertiii last edited by

      How would I convert “</br>” to a newline in a textview? Also how would I convert when a user enters a return to “</br>”?

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        a newline is '\n'. str.replace should work for this.
        Why not post a simple example of what you've tried, and where you are getting stuck...

        1 Reply Last reply Reply Quote 0
        • robertiii
          robertiii last edited by

          I was using a forward slash instead of backslash

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors