MyBB Guida 1.6 - Soluzione bugfix del editor MyBB

Stato
Discussione chiusa ad ulteriori risposte.

Samaritan

Utente Palladium
11 Agosto 2011
4,476
272
342
1,476
Ultima modifica:
Molti capita spesso che l'editor nelle discussioni si vede male come in foto
xmlhttp.php


Ma c'è una semplice soluzione basta recarsi dal nostro FTP in jscripts/editor.js trova:
Codice:
/ Determine the overall height and width - messy, but works
       w = oldTextarea.getDimensions().width+"px";
       if(!w || parseInt(w) < 400)
       {
           w = "400px";
       }
       if(this.options && this.options.height)
       {
           h = this.options.height;
       }
       else if(oldTextarea.offsetHeight)
       {
           h = oldTextarea.offsetHeight+"px";
       }
       else if(oldTextarea.clientHeight)
       {
           h = oldTextarea.clientHeight+"px";
       }
       else if(oldTextarea.style.height)
       {
           h = oldTextarea.style.height;
       }
       else
       {
           h = "400px";
       }
       this.editor.style.width = w;
       this.editor.style.height = h;
Sostituiamolo con questo codice:

Codice:
// Determine the overall height and width - messy, but works
w = "550px";
h = "300px";
this.editor.style.width = w;
this.editor.style.height = h;
Dopo andremo a trovare questa stringa:
Codice:
  textInput.style.height = parseInt(areaContainer.style.height)+"px";
textInput.style.width = parseInt(areaContainer.style.width)+"px";
E la andiamo a sostituire con questa:
Codice:
[textInput.style.height = "229px";
textInput.style.width = "544px";
Il risultato sarà questo.
xmlhttp.php


Fonte: caygri (Forum esterno)
 
Stato
Discussione chiusa ad ulteriori risposte.