File size: 282 Bytes
b91e262 | 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;
|