Reputation: 423
I am having a hard time trying to prevent the overflowing text inside a codeblock. The problem seem to be only with codeblocks, which ignores its parent container width. As per the example below, when editing using a codeblock the text is not breaking into new lines when reaching the end of the container.
https://codesandbox.io/s/1oqr4xyy6j
Upvotes: 0
Views: 1742
Reputation: 2008
Demo - https://codesandbox.io/s/r4qx32m8wm
I made this change in rich-editor.css
CSS
.RichEditor-editor .public-DraftStyleDefault-pre pre {
white-space: normal;
}
Upvotes: 1
Reputation: 17249
You can add the following to your CSS:
pre {
overflow: hidden;
}
Working example here.
Upvotes: 0