1.0.1 • Published 1 year ago

draftjs-node-utils v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

DraftJs Node Utils

ISC Licence Quality Gate Status codecov Latest Version

This library provides a set of utility functions to convert draftJs content in a Node JS environment without browser dependencies.
Implementation was extracted from sstur/draft-js-utils and modified

Installation & Usage

Use npm to install the package. Alternatively you can find the latest downloads on the release page.

$ npm install draftjs-node-utils

1. Convert HTML to DraftJS

import draftJs from 'draft-js';
import { htmlToDraftJs } from "draftjs-node-utils";

const contentState = htmlToDraftJs(html);
const draftJsRaw = draftJs.convertToRaw(contentState);

Issues

Please make sure to read the issue reporting checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

Changelog

Detailed changes for each release are documented in the release notes.

Contribution

Contributions, issues and feature requests are welcome. Feel free to check issues page if you want to contribute. Please make sure to read the contributing guide before making a pull request.

License

Copyright © 2022 Chathura Buddhika (chathurabuddi)
This project is ISC licensed.