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
(2013-11-12, 08:06 PM)Arszilla Wrote: [ -> ]How do i edit the editor.js?

Install Notepad++ and open the file .js with it
How will I open it via filezilla?
You can't, moves the file editor.js in your desktop and open the file with Notepad++;
Make the change, save the file and overwrite the file editor.js with the file ./jscripts/editor.js in your server through Filezilla
When I apply those changes listed in the first post to the editor.js file... my formatting bar vanishes. Any idea why or how to bring it back?
Honestly, not a single thing like that is required. This is the most appropriate and proper way to fix textarea overlap:

textarea {
box-sizing: border-box;
}
Please can anybody check me here I have done this fix and it works:

Original
// Determine the overall height and width - messy, but works
        w = oldTextarea.getDimensions().width+"px";
        if(!w || parseInt(w) < 400)
        {
            w = "400px";


My fix
// Determine the overall height and width - messy, but works
        w = oldTextarea.getDimensions().width+"px";
        if(!w || parseInt(w) < 550)
        {
            w = "550px";
(2010-08-06, 01:11 PM)Warmonger Wrote: [ -> ]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!

Only thing that worked for me was to download your file and then upload it. I only have one mod installed and thats MyFacebook Connect....it doesnt show any files changing the editor.js file so I'm wondering how this text box got messed up to begin with???
The fix I have suggested works great!
(2013-12-18, 05:54 PM)marcus123 Wrote: [ -> ]Please can anybody check me here I have done this fix and it works:

Original
// Determine the overall height and width - messy, but works
        w = oldTextarea.getDimensions().width+"px";
        if(!w || parseInt(w) < 400)
        {
            w = "400px";


My fix
// Determine the overall height and width - messy, but works
        w = oldTextarea.getDimensions().width+"px";
        if(!w || parseInt(w) < 550)
        {
            w = "550px";

This fixed it for me. That's all I changed in the file. latest version of mybb
(2013-12-18, 05:54 PM)marcus123 Wrote: [ -> ]Please can anybody check me here I have done this fix and it works:

Original
// Determine the overall height and width - messy, but works
        w = oldTextarea.getDimensions().width+"px";
        if(!w || parseInt(w) < 400)
        {
            w = "400px";


My fix
// Determine the overall height and width - messy, but works
        w = oldTextarea.getDimensions().width+"px";
        if(!w || parseInt(w) < 550)
        {
            w = "550px";

Perfect!! Big Grin
Replacing the editor.js file given here didn't solved the problem. But increasing only the width worked well.
Note: Only edit with Notepad+ Wink
Pages: 1 2 3 4 5 6 7 8 9 10