Skip to content

stordahl/svelte-code-input

Repository files navigation

A Terminal Icon

svelte-code-input

A simple text input that emulates a code editor in the browser.

Installation

npm install svelte-code-input

Usage

<script>
  import CodeEditor from "svelte-code-input/CodeEditor.svelte"
  
  import { writable } from "svelte/store"
  
  const codeStore = writable("");
</script>

<label for="code">My Code Input</label>
<CodeEditor name="code" store={codeStore}/>

Contributing

Contributing docs in the works