[1.6.x] Fix Editor & TextArea
#1
Information 
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!


Attached Files
.js   editor.js (Size: 37.17 KB / Downloads: 1,640)
2+ Years Cisco Networking
There's no place like 127.0.0.1 except for ::1
<snip - annoying animated thing>
Don't bother, It's inside your monitor!
Reply
#2
hey any can move this to turorials??
Exclamation MyBB-Es.Com, spanish support for MyBB Wink
Reply
#3
Perfect solution to the same problem I had. Thank you!


Reply
#4
Yea works perfectly Smile
Reply
#5
Thanks for this!
Reply
#6
Much easier and simpler to do with solely CSS.
good u
Reply
#7
(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.
2+ Years Cisco Networking
There's no place like 127.0.0.1 except for ::1
<snip - annoying animated thing>
Don't bother, It's inside your monitor!
Reply
#8
Thanks!!
Reply
#9
(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.

Reply
#10
Thanks! This works Nice, it was getting REALLY annoying the other way.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)