1.0.0-alpha.13 • Published 5 years ago
tortellini v1.0.0-alpha.13
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
- CSS
css
Instance functions
const editor = new Tortellini(/* ... */);
editor.code // Get the written code
editor.remove(); // Reset the base element
1.0.0-alpha.13
5 years ago
1.0.0-alpha.12
5 years ago
1.0.0-alpha.10
5 years ago
1.0.1-alpha.0
5 years ago
1.0.0-alpha.4
5 years ago
1.0.0-alpha.3
5 years ago
1.0.0-alpha.2
5 years ago
1.0.0-alpha.1
5 years ago
1.0.0-alpha.0
5 years ago
1.0.0-alpha.11
5 years ago
1.0.0-rc.0
5 years ago
1.0.0
5 years ago