@viamrobotics/prime-editor
v0.0.2
Published
## Getting started
Downloads
313
Keywords
Readme
@viamrobotics/prime-editor
Getting started
@viamrobotics/prime-editor
is a collection of Svelte components that wrap code-editing tools.
This primarily based around Codemirror
Installation
Install use the README instructions at @viamrobotics/prime-core to install prime-core. Then install prime-editor using your package manager of choice:
pnpm add --save-dev @viamrobotics/prime-editor
These components require that ssr is disabled.
Ensure that you have a +layout.ts
above all pages that use these components:
export const prerender = false;
export const ssr = false;
Usage
Once installed, you can use the components in your app:
<script lang="ts">
import { JsonEditor } from '@viamrobotics/prime-editor';
</script>
<JsonEditor
initialValue={'{"a": "b"}'}
label="editor"
onChange={(e) => console.log(e)}
/>