1
votes

I have some html generated by Google Docs. The title is centered. Google Docs gave me a <p style='text-align:center' > but that did not center the text in rte, so I changed it to <center> tag that too does not center text.

In the html on the page after rte renders I don't see my center tag. It seems like the html parser is ignoring it.

a) is there a known subset of html that draft.js will deal with?

b) do you think it will be possible to import docs from Word and Google Docs into the rte and preserve formatting?

1

1 Answers

0
votes

a) refer to this source

b) possible only in theory, but impossible in real. The formats in google docs are far more complex than draft-js supports. Draft-js is a editor framework. i.e. draft-js help you manager the cursor move, key press and copy paste, but you need manager the display styles your self.