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

@jinntec/jinntap

v1.27.2

Published

![JinnTap Logo](public/jinntap-logo.png)

Readme

JinnTap

JinnTap Logo

Edit TEI XML documents using a rich text editor. JinnTap preserves the structure of the XML in the editor. There's no need for complex transformation steps from TEI to HTML and back. The representation of the document in the editor corresponds directly with the XML. TEI elements are converted to HTML custom elements, preserving all attributes and structural features.

JinnTap comes as a web component. While it can be used standalone, it is usually meant to be embedded into a larger application context such as TEI Publisher 10, which will include JinnTap and does allow saving and reloading documents. TP 10 has not been released yet.

Installation

npm install jinn-tap

Development Setup

Prerequisites

  • Node.js (v16 or higher)
  • npm (v7 or higher)

Building the Project

# Install dependencies
npm install

# Build the project
npm run build

# Build the demo
npm run build:demo

Running the Demo

# Start the development server
npm run dev

# Preview the built demo
npm run preview

Running Tests

# Open Cypress test runner
npm run cypress:open

# Run tests in headless mode
npm run cypress:run

Usage

Basic Usage

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
    <script type="module" src="node_modules/jinn-tap/dist/jinn-tap.es.js"></script>
</head>
<body>
    <jinn-tap></jinn-tap>
    <pre id="output"></pre>
    <script>
        document.addEventListener('DOMContentLoaded', () => {
            const editor = document.querySelector('jinn-tap');
            const output = document.querySelector('#output');

            editor.addEventListener('content-change', (event) => {
                output.textContent = event.detail.teiXml;
            });
        });
    </script>
</body>
</html>

With Initial Content

<jinn-tap content="<tei-div><tei-p>Initial content</tei-p></tei-div>"></jinn-tap>

JavaScript API

// Get the editor instance
const editor = document.querySelector('jinn-tap').tiptap;

// Set content programmatically
editor.commands.setContent('<tei-div><tei-p>New content</tei-p></tei-div>');

// Get content as HTML
const htmlContent = editor.getHTML();

// Get content as TEI XML
const teiXml = editor.teiXml;

// Focus the editor
editor.focus();

Keyboard Shortcuts

The editor supports the following keyboard shortcuts:

Text Formatting

  • Ctrl/Cmd + B - Toggle bold text (hi with rend="bold")
  • Ctrl/Cmd + I - Toggle italic text (hi with rend="italic")
  • Ctrl/Cmd + U - Toggle underline text (hi with rend="underline")

TEI Elements

  • Ctrl/Cmd + Shift + P - Insert TEI persName
  • Ctrl/Cmd + Shift + L - Toggle list
  • Ctrl/Cmd + Shift + U - Insert footnote
  • Tab - Indent list item
  • Shift + Tab - Outdent list item
  • Enter - Create new list item
  • Backspace at start of list item - Convert to paragraph

General

  • Ctrl/Cmd + C - Copy selected text
  • Ctrl/Cmd + V - Paste text
  • Ctrl/Cmd + X - Cut text
  • Ctrl/Cmd + Z - Undo
  • Ctrl/Cmd + Shift + Z - Redo

Events

The component dispatches the following events:

content-change

Fired when the editor content changes.

editor.addEventListener('content-change', (event) => {
    const { content, teiXml } = event.detail;
    // content: HTML content
    // teiXml: TEI XML content
});

License

GNU General Public License v3.0