Created
May 22, 2009 17:10
-
-
Save davglass/116242 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myEditor = new YAHOO.widget.Editor('editor', { | |
height: '300px', | |
width: '530px', | |
dompath: true, | |
animate: true, | |
extracss: '.yui-spellcheck { background-color: yellow; }' | |
}); | |
/* {{{ Override _handleClick method to keep the window open on click */ | |
myEditor._handleClick = function(ev) { | |
if (this._isNonEditable(ev)) { | |
return false; | |
} | |
this._setCurrentEvent(ev); | |
var tar =Event.getTarget(ev); | |
if (this.currentWindow) { | |
if (!Dom.hasClass(tar, 'yui-spellcheck')) { | |
this.closeWindow(); | |
} | |
} | |
if (!Dom.hasClass(tar, 'yui-spellcheck')) { | |
if (YAHOO.widget.EditorInfo.window.win && YAHOO.widget.EditorInfo.window.scope) { | |
YAHOO.widget.EditorInfo.window.scope.closeWindow.call(YAHOO.widget.EditorInfo.window.scope); | |
} | |
} | |
if (this.browser.webkit) { | |
var tar =Event.getTarget(ev); | |
if (this._isElement(tar, 'a') || this._isElement(tar.parentNode, 'a')) { | |
Event.stopEvent(ev); | |
this.nodeChange(); | |
} | |
} else { | |
this.nodeChange(); | |
} | |
}; | |
/* }}} */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment