šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

executor-editor

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

executor-editor

šŸ”Ø Display and evaluate your JavaScript code

2.0.8
latest
Source
npm
Version published
Maintainers
0
Created
Source

executor-editor

node version npm version downloads count size license github-ci

šŸ”Ø Display and evaluate your JavaScript code.

Preview šŸŽ‰

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

Usage

Installation:

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>
    

API

All settings you can pass by HTML attributes.

data-autoevaluate

  • Default: true

  • Options: true | false

  • Example:

    <pre class="executor-editor" data-autoevaluate="false">
        [...]
    </pre>
    

data-autofocus

  • Default: true

  • Options: true | false

  • Example:

    <pre class="executor-editor" data-autofocus="true">
        [...]
    </pre>
    

data-skin

  • Default: normal

  • Options: normal | blue

  • Example:

    <pre class="executor-editor" data-skin="blue">
        [...]
    </pre>
    

Purpose

The project was created for presentation slides, to embed code and quickly execute it.

License

The MIT License @ 2015

Keywords

executor

FAQs

Package last updated on 20 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts