I am trying to create a coding text editor that performs syntax highlighting on the text entered by the user. Currently I have one text area that takes input and a SyntaxHighlighter component that applies syntax highlighting for the output. I want to combine both and have the textarea to be behind the output with transparent background but the cursor also becomes transparent which is not what I want. Is this possible with CSS? If so how would the styling look like?
import React, {useEffect,useState} from 'react';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
const Editor = (props) => {
const [content, setContent] = useState(props.content);
return (
<div className="code-edit-container">
<textarea
className="code-input"
onChange={evt => setContent(evt.target.value)}
/>
<div className="code-output">
<SyntaxHighlighter language="javascript">
{content}
</SyntaxHighlighter>
</div>
</div>
);
};