From: julmis Date: Thu, 26 Aug 2004 20:32:28 +0000 (+0000) Subject: Merging changes from MOODLE_14_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=af815ebd772ba80895e5689ad6a01098fdf363d8;p=moodle.git Merging changes from MOODLE_14_STABLE --- diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index 104b8c69e5..d6392c43e4 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -1321,14 +1321,17 @@ HTMLArea.prototype._createLink = function(link) { if (typeof link == "undefined") { link = this.getParentElement(); if (link && !/^a$/i.test(link.tagName)) { - link = null; - var sel = this._getSelection(); - var rng = this._createRange(sel); - var len = HTMLArea.is_ie ? rng.text.toString().length : sel.toString().length; - if(len < 1) { - alert("You must select text first!"); - return false; + if(link.tagName.toLowerCase() != 'img') { + link = null; + var sel = this._getSelection(); + var rng = this._createRange(sel); + var len = HTMLArea.is_ie ? rng.text.toString().length : sel.toString().length; + if(len < 1) { + alert("You must select text first!"); + return false; + } } + link = null; } } if (link) { diff --git a/lib/weblib.php b/lib/weblib.php index 93871024ae..19d590d139 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2607,8 +2607,6 @@ function print_speller_code ($usehtmleditor=false) { echo "\tspeller._editor=editor;\n"; echo "\tspeller.openChecker();\n"; echo "}\n"; - echo "config.registerButton(\"spell-check\", \"spell-check\", \"". $CFG->wwwroot ."/lib/speller/spell.gif\", false, spellClickHandler);\n"; - echo "config.toolbar.push([\"spell-check\"]);\n"; } }