Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

Change MYBB text editor width and height

Ads
banner
banner
banner
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#1
Support Team
What's up ladies here I come again posting another tutorial. This time we are going to talk about how to change text editor textarea with and height.

It is pretty easy you will only need to edit one file. So lets get fixing!

Open ./jscripts/editor.js and 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 the code above with:
PHP Code:
Determine the overall height and width messybut works
        w 
"550px";
        
"300px";
        
this.editor.style.width w;
        
this.editor.style.height h

Now in the same file find:

PHP Code:
textInput.style.height parseInt(areaContainer.style.height)+"px";
textInput.style.width parseInt(areaContainer.style.width)+"px"


Replace the code above with:
PHP Code:
textInput.style.height "229px";
textInput.style.width "544px"

If you want to make it wider or higher simply change dimensions in the code you can use px o percent %.

If you only want to change width then you can simply do this find:

PHP Code:
oldTextarea.getDimensions().width+"px";
        if(!
|| parseInt(w) < 400)
        {
            
"400px";
        } 

Now change dimensions like so lets say I want this to be 90% wide so the code should look like this:

PHP Code:
oldTextarea.getDimensions().width+"px";
        if(!
|| parseInt(w) < 600)
        {
            
"90%";
        } 

Take care and good luck Smile
dude Offline referral

Posts: 134
Joined: Mar 2014
Reputation: 1

#2
Member
Love your tutorials Marcus thanks bro keep them coming.
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#3
Support Team
(07-25-2014 06:13 PM)dude Wrote:  Love your tutorials Marcus thanks bro keep them coming.

Thanks very much! I am not clamming to have everything about MYBB forum script but I have pretty good understanding and I am willing to support everyone as good as I can.





User(s) browsing this thread: 1 Guest(s)