Skip to content

🧰 This library provides a set of utility functions to convert draftJs content in a Node JS environment without browser dependencies.

License

Notifications You must be signed in to change notification settings

chathurabuddi/draftjs-node-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

🧰 This library provides a set of utility functions to convert draftJs content in a Node JS environment without browser dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published