UNPKG

draft-js-modifiers

Version:
21 lines (15 loc) 499 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _draftJs = require("draft-js"); var removeBlockStyle = function removeBlockStyle(editorState) { var withoutBlockStyle = _draftJs.RichUtils.tryToRemoveBlockStyle(editorState); if (withoutBlockStyle) { return _draftJs.EditorState.push(editorState, withoutBlockStyle, 'change-block-type'); } return editorState; }; var _default = removeBlockStyle; exports.default = _default;