0

I am new into typescript react and frontend development. All I need to do is break the text inside of the content into 2 line. I looked online and found few solutions to add \n to the text of the context, but they didn't work for me. Could someone give me some hit. Thank you

 <text>
    {content} \\{content} returns some thing like: "This is very long text please break from here\n in order to make it more readable"
  </text>
Sarah Jeffi
  • 53
  • 2
  • 10
  • @ytan11 adding \n to the context content and doing css does not work for me – Sarah Jeffi Jan 06 '23 at 07:21
  • Did you tried `white-space: pre-line` style, using the `pre` tag, or `&NewLine;` entity provided in the answers from the link above? – ytan11 Jan 06 '23 at 07:54
  • Possibly covered by "[How to prevent long words from breaking my div?](/q/320184/90527)", and likely many other questions on SO. – outis Jan 07 '23 at 06:43
  • What is the overall goal? Currently, this question suffers from the [XY problem](https://meta.stackexchange.com/q/66377/133817). – outis Jan 07 '23 at 06:44

1 Answers1

0

Please style the text

.text{
    width: 80vw;
    height: 80vh;
    margin-top: 10%;
    margin-left: 10%;
    justify-content: center;
    display: flex;
    text-align: justify;
}

enter image description here

Naeem Ahmed
  • 216
  • 1
  • 6