Skip to content

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

License

Notifications You must be signed in to change notification settings

prosegrinder/annotatedtext-rehype

Repository files navigation

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);

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •