简体   繁体   中英

Word-Wrap in Rich Text Area

I m trying to design a text editor in my website for which im using rich text editor/rich text area. But while using rich text editor/rich text area im unable to wrap the words. if a user is trying to write a statement without any space then the statement do not wrap to next line in place of that an horizontal scroll bar is generated in the rich text editor/rich text area..

Can any help me to wrap the content of the rich text editor/rich text area.

thank you in advance

Did you try the CSS approach? In the end the text area is a generated HTML and it should work. Use word-wrap to break it into lines.

.break-word {word-wrap: break-word;}

Try this

.breakword
{
     white-space: pre-wrap; /* css-3 */
     white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
     white-space: -pre-wrap; /* Opera 4-6 */
     white-space: -o-pre-wrap; /* Opera 7 */
     word-wrap: break-word; /* Internet Explorer 5.5+ */
}

Reference : http://www.2lessons.info/2012/09/how-to-use-prettify-with-bloggerblogspot.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM