Skip to content
A module to export and format the content from the React Draft.js framework.
JavaScript
Branch: master
Clone or download
Latest commit 71d11f7 Nov 21, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src delete console.log Nov 18, 2016
.gitignore Updates for npm publishing Mar 9, 2016
LICENSE Initial commit Mar 9, 2016
README.md Fix ES6 string Mar 9, 2016
package.json Better configurations Mar 10, 2016

README.md

draft-js-exporter

A module to export and format the content from the React Draft.js framework.

NOT YET ON npm coming soon

This is an early version of an export module. The goal is to provide a modular structure to select the format to export.

Actually there is an early HTML formatter that support BOLD and ITALIC inline styles. It automatically wraps the block inside a p element if the type of the block is unstyled.

Install

npm i draft-js-exporter

# Usage

  var DraftExporter = require('draft-js-exporter');
  
  
  var rawDraftContentBlock = Draft.convertToRaw(contentState);
  var exporter = new DraftExporter(rawDraftContertBlock);
  var contentExported = exporter.export();
  
You can’t perform that action at this time.