draft-js-modifiers
Version:
Modular state modifiers for Draft.js
21 lines (15 loc) • 499 B
JavaScript
;
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;