executor-editor
:hammer: Display and evaluate your JavaScript code.
Demo 🎉
https://piecioshka.github.io/executor-editor/demo/
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
Installation
npm install executor-editor
or
bower install executor-editor
Usage
-
Add CSS class
executor-editor
to HTML element:class Cake {toString() {return '[Cake]';}}console.log(String(new Cake())); -
Add on the bottom of page, example before
</body>
API
All settings you can pass by HTML attributes.
data-autoevaluate
-
Default:
true
-
Options:
true
|false
-
Example:
[...]
data-autofocus
-
Default:
true
-
Options:
true
|false
-
Example:
[...]
data-skin
-
Default:
normal
-
Options:
normal
|blue
-
Example:
[...]
Purpose
The project was created for presentation slides, to embed code and quickly execute it.
License
The MIT License @ 2015-2019