draftjs-node-utils
v1.0.1
Published
draft-js html conversion utils for node
Downloads
102
Maintainers
Readme
DraftJs Node Utils
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.