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 🙏

© 2025 – Pkg Stats / Ryan Hefner

pp-editor

v0.1.1

Published

## Overview

Downloads

20

Readme

PP Editor - Angular Rich Text Editor Standalone Component

Overview

PP Editor is an Angular standalone component that provides a rich text editing experience using Quill.js. It supports multiple content blocks, code blocks, iframe embedding, a floating action menu, and advanced customization.

Supported Angular Versions

PP Editor requires Angular v14.1.0 or later, as it relies on Angular's standalone component APIs introduced in Angular 14.1.0. It is compatible with all subsequent Angular versions that support standalone components, including Angular 15, 16, 17, and newer.

Features

  • Multiple Content Blocks: Manage several rich text blocks within a single editor.
  • Bubble Toolbar: Contextual formatting toolbar appears when selecting text.
  • Special Content Types:
    • Code blocks with syntax highlighting
    • Embedded iframes
    • Custom SVG dividers
  • Keyboard Shortcuts: Triple Enter to create a new content block.
  • SSR Compatible: Uses Angular's isPlatformBrowser for server-side rendering support.
  • Customizable: Extendable with Quill modules, toolbar, themes, and more.
  • Read-Only Mode: Option to make the editor read-only.

Installation

  1. Install dependencies:

    npm install ngx-quill @angular/forms
  2. Import in styles.scss

    @import "quill/dist/quill.bubble.css";
    @import "quill/dist/quill.snow.css";
    @import "quill/dist/quill.core.css";
  3. Import the standalone component and required modules:

    import { PpEditor } from "./path-to-pp-editor";
    import { bootstrapApplication } from "@angular/platform-browser";
    
    bootstrapApplication(AppComponent, {
      providers: [],
      imports: [
        PpEditor,
        // other standalone components or modules if needed
      ],
    });

Usage

<pp-editor></pp-editor>

API

Inputs

  • placeholder: string - Placeholder text for the editor ('Type here...' by default)
  • theme: 'bubble' | 'snow' - Quill theme ('snow' by default)
  • readOnly: boolean - Set to true to make the editor read-only
  • toolbar: any[] - Quill toolbar configuration (default includes headers, formatting, lists, links, images, code blocks, blockquotes, colors, fonts, and alignment)
  • history: object - Quill history module config (default: { delay: 2000, maxStack: 500, userOnly: true })
  • clipboard: object - Quill clipboard module config (default: { matchVisual: false })
  • keyboard: object - Quill keyboard bindings (default: {})

Methods

  • addCodeBlock() - Adds a new code block to the editor.
  • addDivider() - Adds a custom SVG divider to the editor.
  • addIframe() - Prompts for a URL and adds an iframe.
  • removeContent(index: number) - Removes the content block at the specified index.
  • toggleMenu() - Shows/hides the floating action menu.

Events

  • editorCreated(quill: any) - Called when a Quill editor instance is created.

Styling

Default styles are included in pp-editor.css. You can override these styles in your application CSS.

Customization

You can customize the Quill configuration by modifying the toolbar, history, clipboard, and keyboard properties:

this.toolbar = [
  // Your custom toolbar configuration
];
this.history = { delay: 1000, maxStack: 100, userOnly: false };
this.clipboard = { matchVisual: true };
this.keyboard = {
  bindings: {
    /* custom bindings */
  },
};

Keyboard Shortcuts

  • Triple Enter: Press Enter three times quickly to create a new content block.

Browser Compatibility

The component is compatible with modern browsers and supports SSR via Angular's isPlatformBrowser.

License

MIT

Support