Open victors1682 opened 1 year ago
I've been attempting to apply a custom transformation, but I'm facing difficulties in getting it to work. We previously applied the transformation to the same element using 'draft-js' and 'draft-js-export-html'.
Testing
const draftToHtml = require("draftjs-to-html") const data = { blocks: [ { key: '123', text: 'My Heading', type: 'header-one', depth: 0, inlineStyleRanges: [], entityRanges: [], data: {} } ], entityMap: {} } const customEntityTransform = (data) => { return "<h1> Transformed: "+data+"</h1>" } const result = draftToHtml(data, undefined, false, customEntityTransform) console.log(result)
I've been attempting to apply a custom transformation, but I'm facing difficulties in getting it to work. We previously applied the transformation to the same element using 'draft-js' and 'draft-js-export-html'.
Testing