@liveblocks/react-ui
Version:
A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.
19 lines (15 loc) • 469 B
JavaScript
var isEmpty = require('../utils/is-empty.cjs');
var marks = require('../utils/marks.cjs');
function withEmptyClearFormatting(editor) {
const { onChange } = editor;
editor.onChange = (options) => {
if (isEmpty.isEmpty(editor, editor.children)) {
marks.removeMarks(editor);
}
onChange(options);
};
return editor;
}
exports.withEmptyClearFormatting = withEmptyClearFormatting;
//# sourceMappingURL=empty-clear-formatting.cjs.map
;