Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

editron-script-editor

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editron-script-editor

Editron - script editor for html, js and css

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

editron Script-Editor

Build Status

Add code editor for html and css.

npm i editron-script-editor --save

Setup

Add the bundled editor as a plugin

Use bundled versions of this editor

Add the editor after the core-modules and it will register automatically (paths depend on your build-setup)

<link rel="stylesheet" href="../node_modules/editron-script-editor/dist/editron-script-editor.css">

<!-- plugin editor -->
<script type="text/javascript" src="../node_modules/editron/dist/editron-modules.js"></script>
<script type="text/javascript" src="../node_modules/editron/dist/editron.js"></script>
<script type="text/javascript" src="../node_modules/editron-script-editor/dist/editron-script-editor.js"></script>

Webpack build

bundle the editor into your editron-application

Javascript

To use this editor within a webpack build, require the editor and add it to the editors list

const editronScriptEditor = require("editron-script-editor");
const editors = [
    editronScriptEditor
    ...otherEditors
];
const editron = new Editron(schema, data, { editors });
Styles

Optionally import the custom script-editor styles via sass

@import "editron-script-editor/editron-script-editor.scss";

or simply add the bundled css-file (path is depending on your build-setup)

<link rel="stylesheet" href="../node_modules/editron-script-editor/dist/editron-script-editor.css">

Schema

The editor will be added for a matching schema like

{
    "type": "string",
    "format": "css"
}
{
    "type": "string",
    "format": "htmlmixed"
}
{
    "type": "string",
    "format": "javascript"
}

FAQs

Package last updated on 19 May 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc