Interface: CodeEditorProps
Properties
closableTabs
• Optional
closableTabs: boolean
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:34
extensions
• Optional
extensions: Extension
[]
CodeMirror extensions for the editor state, which can provide extra features and functionalities to the editor component.
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:47
extensionsKeymap
• Optional
extensionsKeymap: readonly KeyBinding
[][]
Property to register CodeMirror extension keymap.
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:51
id
• Optional
id: string
By default, Sandpack generates a random value to use as an id. Use this to override this value if you need predictable values.
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:56
initMode
• Optional
initMode: SandpackInitMode
This provides a way to control how some components are going to be initialized on the page. The CodeEditor and the Preview components are quite expensive and might overload the memory usage, so this gives a certain control of when to initialize them.
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:42
readOnly
• Optional
readOnly: boolean
This disables editing of the editor content by the user.
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:60
showInlineErrors
• Optional
showInlineErrors: boolean
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:31
showLineNumbers
• Optional
showLineNumbers: boolean
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:30
showReadOnly
• Optional
showReadOnly: boolean
Controls the visibility of Read-only label, which will only
appears when readOnly
is true
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:65
showRunButton
• Optional
showRunButton: boolean
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:32
showTabs
• Optional
showTabs: boolean
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:29
style
• Optional
style: CSSProperties
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:28
wrapContent
• Optional
wrapContent: boolean
Defined in
sandpack-react/src/components/CodeEditor/index.tsx:33