Open
Description
Hi,
Thanks for developing such a useful library!
My question might seem dumb but I can't figure how to do it... How can I generate an EditorState
out of exported HTML, which preserves inline styles?
I use the following chunk of code to get HTML from an editorState
, which works perfectly:
import { stateToHTML } from 'draft-js-export-html'
const inlineStyles = exporter(editorState)
const content = editorState.getCurrentContent()
const html = stateToHTML(content, { inlineStyles })
But then, when I do:
import { stateFromHTML } from 'draft-js-import-html'
EditorState.createWithContent(stateFromHTML("<p><span style="font-size: 34px">yo</span></p> "))
I lose the font-size
. Any hints?
Thanks a lot!
Metadata
Metadata
Assignees
Labels
No labels