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

editor-elsolya

v0.1.0

Published

Editor-elsolya – framework-agnostic rich text editor as a Web Component with optional React/Vue adapters.

Downloads

84

Readme

editor-elsolya

Rich Text Editor wrapped as a Web Component so it can work with any framework that supports NPM: React / Vue / Angular / Nuxt / Next / any Vanilla JS, etc.

The idea: you install one package:

npm i editor-elsolya

Then you use <editor-elsolya></editor-elsolya> anywhere.


✅ Key point: Why a Web Component?

  • Works in any framework without creating a separate wrapper for each one.
  • You can use it as a normal HTML element.
  • Suitable for Nuxt/Next (keeping SSR in mind — see below).

Quick usage (Vanilla / any framework)

1) Import once (to register the custom element)

import "editor-elsolya";

Note for SSR (Next/Nuxt): importing editor-elsolya is safe on the server, but the editor element only registers/runs in the browser.

2) In your HTML / template

<editor-elsolya id="ed"></editor-elsolya>

3) Read/write content (HTML)

const ed = document.getElementById("ed") as any;

// set
ed.value = "<p>Hello</p>";

// get
console.log(ed.value);

// listen change
ed.addEventListener("change", (e: any) => {
  console.log("changed html:", e.detail.html);
});

React

Simplest way: use it directly as a custom element.

Method 1 (direct)

import "editor-elsolya";

export default function Page() {
  return <editor-elsolya />;
}

Next.js (SSR)

Use it client-side:

"use client";
import "editor-elsolya";

export default function Page() {
  return <editor-elsolya />;
}

Method 2 (ready adapter)

import { EditorElsolyaReact } from "editor-elsolya/react";

export default function Page() {
  return (
    <EditorElsolyaReact
      value="<p>Hello</p>"
      onChange={(html) => console.log(html)}
    />
  );
}

TypeScript note: if TS complains about the JSX element, add a small definition in global.d.ts:

declare namespace JSX {
  interface IntrinsicElements {
    "editor-elsolya": any;
  }
}

Vue 3 / Nuxt 3

Vue 3 (direct)

import "editor-elsolya";

Then:

<template>
  <editor-elsolya @change="onCh" />
</template>

<script setup lang="ts">
const onCh = (e:any) => console.log(e.detail.html);
</script>

Vue Adapter (v-model)

import { EditorElsolyaVue } from "editor-elsolya/vue";
<template>
  <EditorElsolyaVue v-model="html" />
</template>

<script setup lang="ts">
import { ref } from "vue";
import { EditorElsolyaVue } from "editor-elsolya/vue";

const html = ref("<p>Hello</p>");
</script>

Nuxt 3 (SSR)

In Nuxt, make it run client-only:

<template>
  <ClientOnly>
    <editor-elsolya />
  </ClientOnly>
</template>

Or create a client plugin: plugins/editor-elsolya.client.ts

import "editor-elsolya";
export default defineNuxtPlugin(() => {});

Angular

  1. In main.ts:
import "editor-elsolya";
  1. In app.module.ts (so Angular allows custom elements):
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
  1. Use it in a template:
<editor-elsolya (change)="onChange($event)"></editor-elsolya>

API (brief)

  • value: string → HTML الحالي (get/set)
  • disabled: boolean → تعطيل/تفعيل التحرير
  • Event: changedetail: { html: string }

The web component emits a DOM CustomEvent named change.


Development, build, and publish

Inside the project:

npm i
npm run build

To publish to npm:

npm publish --access public

Notes

  • The editor is built on contenteditable + a toolbar (not CKEditor).
  • If you need customizations (colors/buttons/image upload/...): send what you need and we can add it as options/attributes.