When pasting text from word or another source into draftjs the formatting comes along for the ride, I tried stripping the styling data like so:
onChange={(newEditorState) => {
const raw = convertToRaw(newEditorState.getCurrentContent())
for (let i = 0; i < raw.blocks.length; i++){
raw.blocks[i].type = "unstyled"
}
let newContent = convertFromRaw(raw)
newEditorState
const newState = EditorState.push(state, newContent, "change-block-type")
setState(newState)
}} />
Which worked except typing ended up being reversed on input after that, which was very confusing.