Skip to content

Instantly share code, notes, and snippets.

tonis2 / gist:cfeb6d044347d6f3cbab656d6a94eee2
Last active Sep 29, 2018
draft.js remove styles and block-type from selection
View gist:cfeb6d044347d6f3cbab656d6a94eee2
clear() {
const {editorState} = this.state
const selection = editorState.getSelection()
const contentState = editorState.getCurrentContent()
const styles = editorState.getCurrentInlineStyle()
const removeStyles = styles.reduce((state, style) => {
return Modifier.removeInlineStyle(state, selection, style) }, contentState)
const removeBlock = Modifier.setBlockType(removeStyles, selection, 'unstyled')
View A Simple Plan of

A Simple Plan of Salvation

Question Scripture
What is sin? [1 John 3:4][1]
Can one sin by doing nothing? [James 4:17][2]
From where does sin come? [Mark 7:20-23][3]
What is the result of sin? [Romans 8:5-8][4]
What has been done about sin? [Romans 5:6-11][5]