Я использую react-simple-code-editor в моем приложении React.
развернутое приложение: https://ai-code-reviwer-cbv1.onrender.com/br/> github-repo: https://github.com/santukumar01/real Левый редактор. Когда я набираю длинный код, контент отключается вместо прокрутки. Я попытался добавить пользовательские CSS с переполнением и ::-Webkit-Scrollbar, но он все еще не работает, как ожидалось. < /P>
.editor {
font-family: "Fira Code", monospace;
font-size: 15px;
line-height: 1.5;
width: 100%;
height: 100%;
border-radius: 8px;
box-sizing: border-box;
position: relative;
overflow: auto; /* supposed to scroll */
}
.editor pre {
margin: 0 !important;
padding: 12px;
min-height: 100%;
white-space: pre;
word-wrap: normal;
box-sizing: border-box;
}
.editor::-webkit-scrollbar {
width: 6px;
}
.editor::-webkit-scrollbar-thumb {
background: #555;
border-radius: 4px;
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... custom-css