Open jashwanth999 opened 2 years ago
This can not be achieved, it can only be so simple. @jashwanth999 There are more complex options here:
https://github.com/jaywcjlove/react-monacoeditor https://github.com/uiwjs/react-codemirror
@jaywcjlove I just wonder why something like overflow-wrap: normal
does not work here?
@vangelov This highlighting is implemented by overlapping pre and textarea. Maybe this is why overflow-wrap: normal
doesn't work.
Oh, I see. Thanks for the answer.
so there's nothing to do?
I was able to prevent the code from text wrapping by nesting the CodeEditor inside a div with overflow: auto;
and setting the width on the CodeEditor to max-content
.
<div style={{ overflow: 'auto', }}>
<CodeEditor style={{ width: 'max-content', }} />
</div>
Is there any way to stop code wrap and make it horizontal scroll