Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
4.02k stars 614 forks source link

Fullscreen button does not work inside bootstrap modal #336

Closed Aleksandr-ru closed 8 years ago

Aleksandr-ru commented 8 years ago

Occasionally I found out that fullscreen button does not works correctly when trumbowyg is set inside a bootstrap modal box. In my case the autogrow option is set to false, but I think it does not matters.

Informations

Browser + version: Mozilla Firefox 47 OS: Linux (Elementary OS Freya) Resolution: 2560x1080

How to reproduce the bug?

Put trumbowyg inside a bootstrap modal. Open modal, press fullscreen button and see the buggy output.

Alex-D commented 8 years ago

You should use events to customize the editor depends of the environement: http://alex-d.github.io/Trumbowyg/documentation.html#events

See tbwopenfullscreen and tbwclosefullscreen events

jmonday commented 8 years ago

Maybe I'm missing something, but can't this be solved with simple CSS?

body.trumbowyg-body-fullscreen .modal-dialog {
    height: 100%;
    margin: 0 -15px 0 0;
    width: inherit;
}

Note: I'm currently using Bootstrap v3, not sure if the styles would need to be modified for Bootstrap v4.