npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

looq-editor

v1.0.5

Published

a csp compliant code editor with code highlight syntax

Readme

Contributor Covenant

Looqbox Editor

Looqbox editor is a code editor based in javascript. It uses Prism for highlight syntax and it is CSP compliant, which makes it a really good option since almost all other open source code editors don't work well when CSP directives are enabled.

Embedding the editor

The editor can be easily embedded in your application. That can be done in two ways: using Node or downloading de source files.

Installing with Node

First, run:

npm install looq-editor

Then, in your js file, add:

var looqEditor = require('looq-editor/dist/js/editor.js').default;
var css = require('looq-editor/dist/css/editor.css');

Or, if you use ES6 syntax:

import looqEditor from 'looq-editor/dist/js/editor.js';
import css from 'looq-editor/dist/css/editor.css';

Downloading files

If you don't use node, you can download all files inside the resources folder

Then, in your html, include:

<link type="text/css" rel="stylesheet" href="resources/prism/prism.css">
<link type="text/css" rel="stylesheet" href="resources/css/editor.css">
<script type="text/javascript" src="resources/prism/prism.js"></script>
<script type="text/javascript" src="resources/js/editor.js"></script>

Basic Usage

If you installed as a npm package

In your html, create a container for the editor

<div id='myCustomId'></div>

Customize it with the css you want:

#myCustomId {
  width: 800px;
}

Then, instantiate a new editor using the selector you want:

var myEditor = new looqEditor('#myCustomId');

If you included the files

Create a container in your html, with the id looq-editor:

<div id='looq-editor'></div>

This will automatically make the editor available in your application.

Then, customize the container:

#looq-editor {
  width: 800px;
}

Configuring Prism

By default, looq editor downloads the entire bundle that comes along with Prism. Since this package includes a lot of plugins, themes and highlight configurations for over 200 languages, it can be heavy. You can choose to install Prism as a standard module and specify what languages, plugins, and themes you want.

While configurating plugins and themes, take the following into account:

  • Currently, the only supported theme is the Default one
  • The following plugins are supported:
    • Line Numbers