Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor height by default has too much empty space #724

Closed
dheerajsarwaiya opened this issue Apr 13, 2019 · 13 comments
Closed

Editor height by default has too much empty space #724

dheerajsarwaiya opened this issue Apr 13, 2019 · 13 comments
Assignees

Comments

@dheerajsarwaiya
Copy link

Editor height is calculated as sum of block heights + 300px of bottomZone. This extra bottomZone of 300 px is huge for use cases such as comment section, or asking users to write small notes or paragraph.

It would be great if we have option to decrease the bottomZone height.
Screenshot from 2019-04-13 10-38-33

@neSpecc
Copy link
Member

neSpecc commented Apr 29, 2019

Resolved by #719

@neSpecc neSpecc closed this as completed Apr 29, 2019
@arturcesarmelo
Copy link

Wasn't solved, as far as i can see.

image

Even if you reduce the codex-editor content height, an 300px padding-bottom overflows the editor content.

How can i fix this?

@hata6502
Copy link
Contributor

hata6502 commented Dec 2, 2019

minHeight option can't set to 0px.
Please fix

this.config.minHeight = this.config.minHeight || 300;

to

this.config.minHeight = this.config.minHeight!==undefined ? this.config.minHeight || 300;

https://github.com/codex-team/editor.js/pull/719/files#diff-e3bf20e89f6b22c16beb3e17fb3c8a60R154

@neSpecc
Copy link
Member

neSpecc commented Dec 2, 2019

@hata6502 you are welcome to fix it and send a PR

@Dectom
Copy link

Dectom commented Dec 14, 2020

Not fixed, still a problem!

image

minHeight set to 30 however it still creates a 300px padding-bottom, this is really annoying. Please resolve

image

@neSpecc
Copy link
Member

neSpecc commented Dec 14, 2020

Not fixed, still a problem!

image

minHeight set to 30 however it still creates a 300px padding-bottom, this is really annoying. Please resolve

image

you are using it wrong. There is an unnecessary config wrapper in your code.

@khan9920
Copy link

How do I use config in my code? I couldn't find any examples anywhere. Please help!

image

@yuya-pascolo
Copy link

yuya-pascolo commented Jan 26, 2021

@khan9920

this.editor = new EditorJS({
  holder: 'editor-js',
  ...,
  minHeight : 0
});

@andreykorolev
Copy link

andreykorolev commented Nov 17, 2022

When I set minHeight to 0 it creates block with 300 height and then reduces it to 0 after a second.

@roland83
Copy link

roland83 commented Nov 22, 2022

@andreykorolev

When I set minHeight to 0 it creates block with 300 height and then reduces it to 0 after a second.

I noticed this too. There's a "codex-editor__loader" class with height: 30vh, you'll need to override that

.codex-editor__loader { height: 38px !important; }

This eliminated the resize for me. May need to tweak the value for your use case.

@chris-stafflink
Copy link

I added both of these and it now works

.codex-editor__loader { height: 38px !important; }
.codex-editor__redactor { height: 38px !important; }

@nagarjuna-gangadhari
Copy link

.ce-block__content, .ce-toolbar__content { max-width: calc(100% - 100px) !important; } .cdx-block { max-width: 100% !important; }
.codex-editor__loader { height: 38px !important; }
.codex-editor__redactor { padding-bottom: 38px !important; }

@mu7ammad1
Copy link

.ce-block__content, .ce-toolbar__content { max-width: calc(100% - 100px) !important; } .cdx-block { max-width: 100% !important; } .codex-editor__loader { height: 38px !important; } .codex-editor__redactor { padding-bottom: 38px !important; }

this is true code in style css or global styles in the page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests