From: julmis Date: Tue, 6 Apr 2004 21:27:30 +0000 (+0000) Subject: Toolbar imageload fix and undo and redo fix. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3414788e0909e4a9a07252871f1114bbc010e35d;p=moodle.git Toolbar imageload fix and undo and redo fix. --- diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index 634ed3ec77..e37ab6fc58 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -1,15 +1,15 @@ -'; } else if (!el) { el = createSelect(txt); } @@ -1515,19 +1507,19 @@ HTMLArea.prototype._insertImage = function(image) { case "f_align" : img.align = value; break; case "f_vert" : img.vspace = parseInt(value || "0"); break; case "f_horiz" : img.hspace = parseInt(value || "0"); break; - case "f_width" : + case "f_width" : if(value != 0) { - img.width = parseInt(value); + img.width = parseInt(value); } else { break; } break; - case "f_height" : + case "f_height" : if(value != 0) { img.height = parseInt(value); } else { break; - } + } break; } } @@ -1572,7 +1564,7 @@ HTMLArea.prototype._insertTable = function() { tdwidth = Math.round(table.width / param["f_cols"]); } else { tdwidth = Math.round(100 / param["f_cols"]); - } + } td.setAttribute("width",tdwidth + param["f_unit"]); td.setAttribute("valign","top"); /// Moodle hack -ends @@ -1635,7 +1627,7 @@ HTMLArea.prototype._removelink = function() { var editor = this; link = this.getParentElement(); editor.selectNodeContents(link); - + this._doc.execCommand("unlink", false, null); this.focusEditor(); }; @@ -2172,7 +2164,7 @@ HTMLArea.prototype.stripBaseURL = function(string) { // strip host-part of URL which is added by MSIE to links relative to server root // commented out for moodle - //baseurl = baseurl.replace(/^(https?:\/\/[^\/]+)(.*)$/, '$1'); + //baseurl = baseurl.replace(/^(https?:\/\/[^\/]+)(.*)$/, '$1'); basere = new RegExp(baseurl); return string.replace(basere, ""); };