Skip to content

Instantly share code, notes, and snippets.

@web-zen
Created August 17, 2009 19:57
Show Gist options
  • Save web-zen/169337 to your computer and use it in GitHub Desktop.
Save web-zen/169337 to your computer and use it in GitHub Desktop.
<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