gr7d / tortellini

A minimal code editor πŸ₯Ÿ

Home Page:https://olis-pizza.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tortellini πŸ₯Ÿ

Tortellini is a minimal code editor written in TypeScript.

Features

  • Syntax highlighting
  • Code completion

Example Usage

import { Tortellini } from "tortellini";
                         // https://unpkg.com/tortellini/index.js

const editor = new Tortellini(
    document.querySelector("[data-editor]"),
    "javascript"
);

Options

// new Tortellini(element, language, options);
//                                   ^
const options = {
    //                  Default
    caretColor:         "#fff", // Provide a CSS color data type value
    indentionSize:      4
}

Supported Languages

  • JavaScript javascript
  • HTML html (Experimental)
  • CSS css

Instance functions

const editor = new Tortellini(/* ... */);

editor.code       // Get the written code
editor.remove();  // Reset the base element

About

A minimal code editor πŸ₯Ÿ

https://olis-pizza.vercel.app/

License:GNU Lesser General Public License v2.1


Languages

Language:TypeScript 100.0%