Alex-D / Trumbowyg

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

<div id="trumbowyg-icons"> is remaining without style #1456

Open Gilbertdelyon opened 2 months ago

Gilbertdelyon commented 2 months ago

I am using Trumbowyg in HumHub, (based on Yii). It works !

Small issue: In some cases, when I leave the form page where Trombowyg is used, the <div id="trumbowyg-icons"> is remaining in the DOM but without Trumbowyg css (HH is massively using JS and REST). The result is that this <div id="trumbowyg-icons"> is not styled and the height is "155px" instead of "0",

This is what I did in my js file: (Sorry, comments in french)

//Activation script richtext pour le corps de texte du mail
$('#mail-body').trumbowyg({
         lang: 'fr',
 });
 //<div id="trumbowyg-icons"> reste affichée quand on revient à la page précédente, mais sans le css qui la cache. Résultat = une marge importante en haut de page. Marge qui disparait avec un style en attribut) 
 $('#trumbowyg-icons').css('height', '0px');

Now it works. So, I would suggest this <div id="trumbowyg-icons"> to be styled by attribute instead of css file.