BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Feedback for “Block Side Menu”

Open linhtrinh18 opened this issue 1 year ago • 1 comments

When i disable side menu, it's still have the left and right padding-margin. I want to expand the editor across the width of the element.

I'm not figuring out how to remove the padding of the side menu, even it's already disable.

  <BlockNoteView 
  editor={editor} 
  sideMenu={false}
  editable={false}
  formattingToolbar={false}
  linkToolbar={false}
  filePanel={false}
  slashMenu={false}
  tableHandles={false}
  className='px-0 mx-0'
  />
  

image

linhtrinh18 avatar Aug 06 '24 17:08 linhtrinh18

If you're using Tailwind I think this should work:

const editor = useCreateBlockNote({
  domAttributes: {
    editor: {
      class: "px-0 mx-0",
    },
  },
});

matthewlipski avatar Aug 27 '24 13:08 matthewlipski

The padding seems to be coming from a class called bn-editor, you can override that in your CSS file, styles.css eg. and remove the padding with padding-inline: 0px

https://www.blocknotejs.org/docs/styling-theming/overriding-css

jokedos avatar Jun 25 '25 17:06 jokedos

Think it is safe to close this

nperez0111 avatar Jun 25 '25 17:06 nperez0111