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

ngx-omniview

v0.0.11

Published

A universal content viewer for Angular that renders text, HTML, Markdown, LaTeX, MathJax, JSON, and more

Downloads

68

Readme

ngx-omniview

Angular NPM version License: MIT Downloads GitHub Website YouTube

NPM

A universal content viewer for Angular Renders any raw string input as Plain Text, HTML, Markdown, LaTeX, MathJax, JSON, and more... all from a single component.


⚠️ Development Status

This project is currently in active development. While we strive for stability, you may encounter bugs or unexpected behavior.

🐛 Found an issue? Please report it so we can improve!
💡 Have a suggestion? We'd love to hear your feedback!


Features

  • Multi-format support: text, html, markdown, latex, mathjax, json, code
  • Currently compatible with Angular v15
  • 🔄 Planned compatibility for Angular v16–20
  • Simple API: Just pass data and format
  • Unstyled: Adapts to your design
  • Lightweight: Modular renderer architecture

Installation

npm install ngx-omniview

Peer Dependencies

To keep the bundle size minimal, ngx-omniview relies on several peer dependencies. Install only the dependencies needed for the formats you use.

Required:

  • @angular/core and @angular/common >=15.0.0 <21.0.0 (Angular 15–20)

Optional (install only for the formats you use):

  • katex >=0.16.0 <0.17.0 — for latex format
  • mathjax-angular >=2.0.0 <4.0.0 — for mathjax format
  • ngx-markdown >=15.0.0 <21.0.0 — for markdown format

Formats like text, html, json, and code work without any optional peer dependencies.

npm install katex@~0.16.25          # For LaTeX (tested with 0.16.25)
npm install mathjax-angular@~2.1.1  # For MathJax (tested with 2.1.1)
npm install ngx-markdown@~15.1.0    # For Markdown (tested with 15.1.0)

Usage

Basic Example

1. Import NgxOmniviewModule in your AppModule:

// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NgxOmniviewModule } from 'ngx-omniview';
import { MarkdownModule } from 'ngx-markdown';
import { MathjaxModule } from 'mathjax-angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    NgxOmniviewModule,
    MarkdownModule.forRoot(),  // Required for markdown format
    MathjaxModule.forRoot()    // Required for mathjax format
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

2. Use the component in your templates:

// app.component.ts
import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: `<omniview [data]="content" [format]="'text'"></omniview>`
})
export class AppComponent {
  content = 'Hello World!';
}

Supported Formats

<omniview [data]="text" [format]="'text'"></omniview>
<omniview [data]="html" [format]="'html'"></omniview>
<omniview [data]="markdown" [format]="'markdown'"></omniview>
<omniview [data]="latex" [format]="'latex'"></omniview>
<omniview [data]="mathjax" [format]="'mathjax'"></omniview>
<omniview [data]="json" [format]="'json'"></omniview>
<omniview [data]="code" [format]="'code'"></omniview>

Additional Setup (for LaTeX and Markdown)

✅ 1. Add LaTeXJS Script to index.html

Add the following script inside your index.html (preferably before the closing </body> tag):

<script type="module">
  import { LaTeXJSComponent } from "https://cdn.jsdelivr.net/npm/latex.js/dist/latex.mjs";
  customElements.define("latex-js", LaTeXJSComponent);
</script>

This enables the <latex-js> custom element used by ngx-omniview for LaTeX rendering.

✅ 2. Update angular.json for Markdown + LaTeX Styling

To support Markdown with LaTeX rendering, add the following entries to the build > options section in your angular.json:

"styles": [
  "node_modules/katex/dist/katex.min.css"
],
"scripts": [
  "node_modules/katex/dist/katex.min.js",
  "node_modules/katex/dist/contrib/auto-render.min.js"
]

API

Inputs

| Input | Type | Default | Description | |-------|------|---------|-------------| | data | string | '' | Raw content to render | | format | OmniviewFormat | 'text' | Content format type |

Types

type OmniviewFormat = 
  | 'text' 
  | 'html' 
  | 'markdown' 
  | 'latex' 
  | 'mathjax' 
  | 'json' 
  | 'code';

Development Status

| Format | Status | |--------|--------| | text | ✅ Implemented | | html | ✅ Implemented | | markdown | ✅ Implemented | | latex | ✅ Implemented | | mathjax | ✅ Implemented | | json | ✅ Implemented | | code | 🚧 In Progress |

Contributing

Contributions welcome! See GitHub repository for details.

License

MIT © Binapani LTD


Report BugRequest FeatureView on NPM

Made with ❤️ for Angular