chore: added codemirror placeholder

This commit is contained in:
Anoop M D
2025-11-28 06:06:22 +05:30
parent 55a6af1ce3
commit f367ea5a89
2 changed files with 6 additions and 0 deletions

View File

@@ -18,6 +18,11 @@ const StyledWrapper = styled.div`
flex-direction: column-reverse;
}
.CodeMirror-placeholder {
color: ${(props) => props.theme.text} !important;
opacity: 0.5 !important;
}
.CodeMirror-linenumber {
text-align: left !important;
padding-left: 3px !important;

View File

@@ -52,6 +52,7 @@ export default class CodeEditor extends React.Component {
const editor = (this.editor = CodeMirror(this._node, {
value: this.props.value || '',
placeholder: '...',
lineNumbers: true,
lineWrapping: this.props.enableLineWrapping ?? true,
tabSize: TAB_SIZE,