Hello everyone, I have a problem. I’m trying to use CodeMirror to display PowerShell code on my website, but I’m having trouble integrating the powershell.js file present in CodeMirror. Does anyone have an idea? My code is available below.
import CodeMirror from ‘@uiw/react-codemirror’;
import { powershell } from ‘codemirror/mode/powershell/powershell’;
<CodeMirror
value={typeof selectedScriptContent === ‘string’ ? selectedScriptContent : ‘’}
theme=“dark”
height=“97%”
options={{
mode: ‘powershell’,
}}
readOnly=‘true’
/>
I would like to specify that this is the essential code for understanding my website (built in React).
thank you for your return