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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
.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.
回答2:
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
});