Closed heaplabs closed 7 years ago
Thanks for feedback @heaplabs, I will improve it soon. For now you can refer this: https://github.com/jpuri/react-draft-wysiwyg/blob/master/docs/src/components/Demo/index.js#L66
@heaplabs: I have added more details to readme today. Plz share ur feedbacks. PR also welcome 😄
Additional to that: What is convertToRaw
or for what is it needed, since rawContentState is never used?
//edit: Okay my bad... that function comes from draft-js itself. 😃 I might send you a PR that mentions that.
Thanks for you work!
I add some more clarity to readme, hope it helps.
The example usage on the Readme file is as follows:
` import draftToHtml from 'draftjs-to-html';
const rawContentState = convertToRaw(editorState.getCurrentContent()); const markup = draftToHtml(contentState, directional, customEntityTransform); `
Its not clear what the arguments
contentState
,directional
, andcustomEntityTransform
should be ? And how is therawContentState
supposed to be used to get the markup ?Thank you, Akhilesh