Created
August 17, 2009 19:57
-
-
Save web-zen/169337 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
<script type="text/javascript" src="frameworks/yui_2.7.0b/yui/build/yuiloader/yuiloader-debug.js"></script> | |
<script type="text/javascript" src="js/loader-config.js"></script> | |
<script type="text/javascript"> | |
(function() { | |
_yuiloader_config.config.onSuccess = function () { | |
editAreaLoader.init({ | |
id: "textarea_1" // textarea id | |
,min_height: "400" | |
,syntax: "xml" // syntax to be uses for highlighting | |
,start_highlight: true // to display with highlight mode on start-up | |
,allow_toggle: false // disable toggle button | |
,toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, word_wrap, |, help" | |
}); | |
}; | |
_yuiloader_config.config.onFailure = function () { | |
alert("epic failure"); | |
}; | |
var loader = new YAHOO.util.YUILoader(_yuiloader_config.config); | |
// is this necessary? | |
var modules = _yuiloader_config.modules; | |
for (i=0; i < modules.length; ++i) { | |
loader.addModule(modules[i]); | |
} | |
// could this also be added to _yuiloader_config.config? | |
loader.require(["base","button", "element", "reset-fonts-grids", "yuiloader-dom-event", "maincss", "editarea"]); | |
// Load the files using the insert() method. | |
loader.insert(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment