I am using TinyMCE text editor and the text within the does not roll over when the line goes beyond the width, rather a scroll bar appears and the text goes on horizontally. How can I confine the text withing the text box width and not have a horizontal scroll bar.
.tinymce-content { white-space: normal; }
This sounds like a CSS issue. Can you provide a working example or demo URL? It sounds like the text is not wrapping to its container.
Also, text won't wrap unless it contains spaces or hyphens, if that makes a difference.
There's a param in TinyMCE that adds CSS style which makes text spread wide without wrapping it by the container box (adding horizontal scrollbar). It's boolean "nowrap". To make text wrapped inside the container box set it to false (this actually a default):
tinymce.init({
...
nowrap : false
});
来源:https://stackoverflow.com/questions/8464929/how-to-prevent-horizontal-scrolling-of-mce-editor