🔨 Display and evaluate your JavaScript code.
https://piecioshka.github.io/executor-editor/demo/
horizontal
, vertical
npm install executor-editor
or
bower install executor-editor
Add CSS class executor-editor
to HTML element:
<pre class="executor-editor">
class Cake {
toString() {
return '[Cake]';
}
}
console.log(String(new Cake()));
</pre>
Add on the bottom of page, example before </body>
<link href="/path/to/executor-editor/dist/executor-editor.css"/>
<link href="/path/to/executor-editor/dist/skins/blue-skin.css"/>
<link href="/path/to/executor-editor/dist/skins/normal-skin.css"/>
<script src="/path/to/executor-editor/dist/executor-editor.js"></script>
<script>ExecutorEditor.setup();</script>
All settings you can pass by HTML attributes.
data-autoevaluate
true
Options: true |
false |
Example:
<pre class="executor-editor" data-autoevaluate="false">
[...]
</pre>
data-autofocus
true
Options: true |
false |
Example:
<pre class="executor-editor" data-autofocus="true">
[...]
</pre>
data-skin
normal
Options: normal |
blue |
Example:
<pre class="executor-editor" data-skin="blue">
[...]
</pre>
The project was created for presentation slides, to embed code and quickly execute it.
The MIT License @ 2015-2019