kkfor / for-editor

for-editor - A markdown editor based on React
https://md.kkfor.com/
MIT License
405 stars 77 forks source link

remove 'height' from default props #8

Closed luhaopeng closed 5 years ago

luhaopeng commented 5 years ago

qq 20190201154250

Short

the 'height' inside props overlays the 'height' in class '.for-fullscreen'

Detail

props里的{ height: '600px' } 会使fullscreen无法真正全屏。因为props里的height直接加在元素上,优先级太高,覆盖了.for-fullscreen里的height: 100%;.for-container里已经包含了height: 600px;,无需重复设置默认高度。

如果考虑自定义高度的话,要么考虑从自定义options读取height,要么考虑其他方式实现fullscreen。