MyBB Tutorials

Tutorial Fix Editor & TextArea

Submitted by linkzy, , Thread ID: 471

Thread Closed
20-01-2015, 12:14 PM
#1
If you happen to have your editor like this one above there is a fix for it :
1- Open (jscripts/editor.js)
- Find:
PHP Code:
// Determine the overall height and width - messy, but works
        
oldTextarea.getDimensions().width+"px";
        if(!
|| parseInt(w) < 400)
        {
            
"400px";
        }
        if(
this.options && this.options.height)
        {
            
this.options.height;
        }
        else if(
oldTextarea.offsetHeight)
        {
            
oldTextarea.offsetHeight+"px";
        }
        else if(
oldTextarea.clientHeight)
        {
            
oldTextarea.clientHeight+"px";
        }
        else if(
oldTextarea.style.height)
        {
            
oldTextarea.style.height;
        }
        else
        {
            
"400px";
        }
        
this.editor.style.width w;
        
this.editor.style.height h
- Replace it with:

PHP Code:
// Determine the overall height and width - messy, but works
        
"550px";
        
"300px";
        
this.editor.style.width w;
        
this.editor.style.height h

- Find:

PHP Code:
textInput.style.height parseInt(areaContainer.style.height)+"px";
        
textInput.style.width parseInt(areaContainer.style.width)+"px"
- Replace it with:
PHP Code:
textInput.style.height "229px";
        
textInput.style.width "544px"


You can play around with the height and width to your liking/size.

Well i am talking about fixing this -

[Image: YG5F4Ts.png]
| A | v4hl| Addicted | Senpai | Sui | Sensei | H | fdigl |



Users browsing this thread: 4 Guest(s)