An open API service indexing awesome lists of open source software.

https://github.com/piecioshka/executor-editor

🔨 Display and evaluate your JavaScript code.
https://github.com/piecioshka/executor-editor

Last synced: 4 months ago
JSON representation

🔨 Display and evaluate your JavaScript code.

Awesome Lists containing this project

README

        

# executor-editor

[![node version](https://img.shields.io/node/v/executor-editor.svg)](https://www.npmjs.com/package/executor-editor)
[![npm version](https://badge.fury.io/js/executor-editor.svg)](https://badge.fury.io/js/executor-editor)
[![downloads count](https://img.shields.io/npm/dt/executor-editor.svg)](https://www.npmjs.com/package/executor-editor)
[![size](https://packagephobia.com/badge?p=executor-editor)](https://packagephobia.com/result?p=executor-editor)
[![license](https://img.shields.io/npm/l/executor-editor.svg)](https://piecioshka.mit-license.org)
[![github-ci](https://github.com/piecioshka/executor-editor/actions/workflows/testing.yml/badge.svg)](https://github.com/piecioshka/executor-editor/actions/workflows/testing.yml)

🔨 Display and evaluate your JavaScript code.

## Preview 🎉

![](./screenshots/editor.png)

## Features

- ✅ Embed any programming code
- ✅ Highlight JavaScript syntax
- ✅ Auto-evaluate the JavaScript code
- ✅ Execute code on demand
- ✅ Layout modes: `horizontal`, `vertical`
- ✅ Multiple instance on single page
- ✅ Support skins
- ✅ Display errors in red color

## Usage

Installation:

```bash
npm install executor-editor
```

or

```bash
bower install executor-editor
```

1. Add CSS class `executor-editor` to HTML element:

```html


class Cake {
toString() {
return '[Cake]';
}
}

console.log(String(new Cake()));


```

2. Add on the bottom of page, example before `