Yoopta-Editor
Yoopta-Editor copied to clipboard
[BUG] Can't override the default style paddingBottom on the editor itself with the style prop.
Has this bug been raised before?
- [x] I have checked "open" AND "closed" issues and this is not a duplicate
Description
Can't override the default style paddingBottom on the editor itself with the style prop.
The default from the readme { width: '400px', paddingBottom: '100px' }
My styles:
<YooptaEditor
style={{width: '100%', paddingBottom: '0px'}}
/>
The width works but the padding stays 100px. I was able to set it with !important so not urgent.
.yoopta-editor {
padding-bottom: 0 !important;
}
And by the way awesome editor thanks!
Screenshots
No response
Do you want to work on this issue?
No
@Keneficka you can override it if you pass a class to YooptaEditor that overrides the padding bottom.
For example:
.override {
padding-bottom: 2px;
}
<YooptaEditor
className='override'
editor={editor}
selectionBoxRoot={selectionRef}
value={value}
onChange={handleOnChange}
/>
I understand why that's there, as a workaround to still display the editor and make it clickable when is completely empty. But we should come up with a better idea. Maybe apply a min-height, instead of a padding, and it should only be applied on :empty.
I will have a look at this one.