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.
Asked
Active
Viewed 1,506 times
2 Answers
1
Demo - https://codesandbox.io/s/r4qx32m8wm
I made this change in rich-editor.css
CSS
.RichEditor-editor .public-DraftStyleDefault-pre pre {
white-space: normal;
}

dysfunc
- 2,008
- 1
- 13
- 15
0

Colin Ricardo
- 16,488
- 11
- 47
- 80
-
Tried that as a workaround, but doesn't seem to be the expected behavior as shown here https://draftjs.org/ – adavia Jul 11 '18 at 22:22