svelte-ace
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.21 • Public • Published

    svelte-ace

    Ace Editor for Svelte with TypeScript support

    Svelte Ace Made with Svelte License Discord Badge


    Get proper typescript type completions for ace editor in Svelte.

    Install :

    npm i svelte-ace
    

    Usage :

    <script lang="ts">
      import { AceEditor } from "svelte-ace";
      import "brace/mode/json";
      import "brace/theme/chrome";
      let text = "";
    </script>
    
    <AceEditor
      on:selectionChange={(obj) => console.log(obj.detail)}
      on:paste={(obj) => console.log(obj.detail)}
      on:input={(obj) => console.log(obj.detail)}
      on:focus={() => console.log('focus')}
      on:documentChange={(obj) => console.log(`document change : ${obj.detail}`)}
      on:cut={() => console.log('cut')}
      on:cursorChange={() => console.log('cursor change')}
      on:copy={() => console.log('copy')}
      on:init={(editor) => console.log(editor.detail)}
      on:commandKey={(obj) => console.log(obj.detail)}
      on:changeMode={(obj) => console.log(`change mode : ${obj.detail}`)}
      on:blur={() => console.log('blur')}
      width='100%'
      height='300px'
      lang="json"
      theme="chrome"
      value={text} />

    Links :



    Explore

    Install

    npm i svelte-ace

    DownloadsWeekly Downloads

    32

    Version

    1.0.21

    License

    MIT

    Unpacked Size

    3.4 MB

    Total Files

    13

    Last publish

    Collaborators

    • avatar