mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-27 15:15:50 +00:00
Use @uiw/react-codemirror and react@18
Updating redocly to latest and leveraging `@uiw/react-codemirror` which it also uses.
This commit is contained in:
15
content/shared/editor/javascript-editor.tsx
Normal file
15
content/shared/editor/javascript-editor.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { javascript } from '@codemirror/lang-javascript'
|
||||
import { Editor, EditorWrapperProps } from './editor'
|
||||
|
||||
export const JavascriptEditor = ({value, onChange, readOnly }: EditorWrapperProps) => {
|
||||
return <Editor
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
readOnly={readOnly}
|
||||
extensions={
|
||||
[
|
||||
javascript(),
|
||||
]
|
||||
}
|
||||
/>
|
||||
}
|
||||
Reference in New Issue
Block a user