MyBB Community Forums

Full Version: [1.6.x] Fix Editor & TextArea
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10
If your like me you'd hate for your forums to not look half way decent. If you get sick and tired of looking at this, with the text area all hanging out of the editor, then scroll down.

[Image: 90djtl.png]

Then follow these steps below.

Open (jscripts/editor.js)

Find:
		// 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;
Replace With:
		// Determine the overall height and width - messy, but works
		w = "550px";
		h = "300px";
		this.editor.style.width = w;
		this.editor.style.height = h;

Find:
		textInput.style.height = parseInt(areaContainer.style.height)+"px";
		textInput.style.width = parseInt(areaContainer.style.width)+"px";
Replace With:
		textInput.style.height = "229px";
		textInput.style.width = "544px";

And you should end up with a fixed editor and textarea that looks like this.

[Image: 141qyr7.png]

You can play around with the height and width to your liking/size. This works and looks the same on IE, Firefox, and Chrome.

Still having problems applying the patch? Download a original copy of editor.js with this patch applied below.

If you like push the [Image: postbit_reputation.gif] button!
-Warmonger

UPDATED FOR 1.6.3!
hey any can move this to turorials??
Perfect solution to the same problem I had. Thank you!
Yea works perfectly Smile
Thanks for this!
Much easier and simpler to do with solely CSS.
(2010-08-08, 05:41 AM)Scoutie44 Wrote: [ -> ]Much easier and simpler to do with solely CSS.

Tried editing templates and CSS. Much easier/faster to edit the JavaScript itself.
Thanks!!
(2010-08-08, 05:41 AM)Scoutie44 Wrote: [ -> ]Much easier and simpler to do with solely CSS.

Post your css solution ?

Because i can tell you 100% that editing the css or templates wont give you the same result.

Thanks! This works Nice, it was getting REALLY annoying the other way.
Pages: 1 2 3 4 5 6 7 8 9 10