D
D
Dadad2020-04-20 17:59:57
css
Dadad, 2020-04-20 17:59:57

How to make a line break in a div with contenteditable true?

There is a div contenteditable="true". How do I wrap a word at the end of a line to a new line?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2020-04-20
@Dadad

Wrapping by whole words should work anyway, but you can also force it in css
word-wrap: normal

If you want a hyphen to appear inside a word, then
word-break: break-all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question