Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1.6.x - Fixing Message Editor (Relative Size)
#1
I know there is a similar tutorial but mine us using a different approach.

In this case the message editor will always fill the box it is in. Meaning it will go all the way to the right end of the container. This even works when the theme uses different sizes there.

First you will have to edit jscripts/editor.js

Comment out the lines:
171-175, 196, 258,267
Just write // at the start of each of those.

You will need to add this to the global.css

.messageEditor{
margin:0px;
padding:4px;
}

#message_new{
margin:0px;
padding:4px;
height: 313px !important;
width: 99%;
}

And you are done Wink

Hope this helps.
Reply
#2
Hi Tatsuto, thanks for the tutorial

just a tip: it would be better if you show the lines instead of their number, since a lot of people (including me) have the editor.js already modified, and the lines won't match
Dulcorados.com | Foro de repostería en español
[url=www.dulcorados.com][/url]
Reply
#3
It comes down to commenting out any line and syntax that mentioned width.

Cannot be copied as whole. This is a shortened version of the orginal file and cannot be used as is! Only for finding the lines that I commented out.
		// 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;

		// Set the width/height of the area
		subtract = 20;
		subtract2 = 8;
		areaContainer.style.height = parseInt(Element.getDimensions(this.editor).height)-this.toolbarHeight-subtract+"px";
		//areaContainer.style.width = parseInt(Element.getDimensions(this.editor).width)-subtract2+"px";

		// Create text area
		textInput = document.createElement("textarea");
		textInput.setAttribute("cols", oldTextarea.getAttribute("cols"));
		textInput.setAttribute("rows", oldTextarea.getAttribute("rows"));
		textInput.id = this.textarea;
		textInput.name = oldTextarea.name+"_new";
		textInput.style.height = parseInt(areaContainer.style.height)+"px";
		//textInput.style.width = parseInt(areaContainer.style.width)+"px";
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)