next.js/examples/cms-payload/payload/fields/richText/largeBody/plugin.ts
plugin.ts12 lines295 B
const withLargeBody = (incomingEditor) => {
  const editor = incomingEditor;
  const { shouldBreakOutOnEnter } = editor;

  editor.shouldBreakOutOnEnter = (element) =>
    element.type === "large-body" ? true : shouldBreakOutOnEnter(element);

  return editor;
};

export default withLargeBody;
Quest for Codev2.0.0
/
SIGN IN