Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue : Text get cut while using break word

Tags:

html

At the time of add story, I have given ckeditor to add experience details & advice section. But at the time of display it goes out of scope for that we have used "word-wrap: break-word;". Using this text get cut like my text is "cool" it displays "co" & to new line "ol"

Please clienk on below link, you will see "Experience Details" & "My Advice" section. In "Experience Details" section text get cut in the sentence "I don't smoke. Never did. There was plenty of peer pressure to start. Growing up the cool kids did it. My parents did it.".

http://www.techmodi.com/demo/firstjitters/story/MTQz/readStory

I want to resolve this text cut issue. Please suggest me solution if anybody have.

like image 1000
user2417911 Avatar asked Nov 20 '25 04:11

user2417911


2 Answers

Replace &nbsp with space. like this.

  $string = str_replace("&nbsp"," ", $string);

Must work.

like image 59
Fasil kk Avatar answered Nov 22 '25 19:11

Fasil kk


Don't use   in the text you want to be shown on multiple lines. Just replace the &nbsp with just a space char (" ") everywhere you want the text to break onto the new line.

like image 24
Ruslan Avatar answered Nov 22 '25 17:11

Ruslan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!