annotatedtext-rehype
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

annotatedtext-rehype

Node.js CI

A lightweight JavaScript library based on annotatedtext and rehype-parse for converting HTML documents into an annotated text format consumable by LanguageTool as AnnotatedText.

Documentation

For details, please see https://www.prosegrinder.com/annotatedtext-rehype.

Install

This package is ESM only. Node 12+ is needed to use it, and it must be imported instead of required.

npm:

npm install annotatedtext-rehype --save

Usage

Use build to convert valid HTML into AnnotatedText.

import { build } from "annotatedtext-rehype";

const text = "<p>Some <b>bold</b> text.</p>";
const annotatedtext = build(text);
const ltdata = JSON.stringify(annotatedtext);

Package Sidebar

Install

npm i annotatedtext-rehype

Weekly Downloads

1

Version

1.0.12

License

MIT

Unpacked Size

8.89 kB

Total Files

6

Last publish

Collaborators

  • davidlday