UNPKG

draft-js-modifiers

Version:
11 lines (9 loc) 359 B
import { EditorState, RichUtils } from 'draft-js'; var removeBlockStyle = function removeBlockStyle(editorState) { var withoutBlockStyle = RichUtils.tryToRemoveBlockStyle(editorState); if (withoutBlockStyle) { return EditorState.push(editorState, withoutBlockStyle, 'change-block-type'); } return editorState; }; export default removeBlockStyle;