File size: 282 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 |
const withLabel = (incomingEditor) => {
const editor = incomingEditor;
const { shouldBreakOutOnEnter } = editor;
editor.shouldBreakOutOnEnter = (element) =>
element.type === "label" ? true : shouldBreakOutOnEnter(element);
return editor;
};
export default withLabel;
|