javascript - Word wrapping is not working -


this created div. , give white-space: normal function word wrapping when type contents. function working in chrome,opera , safari browser. words not wrapping in mozilla firefox , edge browser. , tried word-wrap: break-word function. not working. please give me solution.

<div class = "list-name-field" id = "save_list" style = "white-space: normal; width: 240px; min-height: 35px; border-radius: 3px; margin-left: auto; margin-right: auto; background-color: #ccc; margin-top: 5px; " contenteditable = "true" data-placeholder = "add list..."></div> 

you need add word-break: break-all if need break long word

<div class = "list-name-field" id = "save_list" style = "white-space: normal;word-break: break-all; width: 240px; min-height: 35px; border-radius: 3px; margin-left: auto; margin-right: auto; background-color: #ccc; margin-top: 5px; " contenteditable = "true" data-placeholder = "add list..."></div> 


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -