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
//Setting focus | |
var myEditor = new YAHOO.widget.Editor('foo', { | |
//Config | |
}); | |
myEditor.render(); | |
//Pre 2.7.0 | |
myEditor._focusWindow(); |
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
.yui-skin-sam .yui-layout { | |
background-color:#CCCCCC; | |
} | |
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('demo', { | |
//config here | |
}); | |
myEditor.on('editorContentLoaded', function() { | |
YAHOO.util.Dom.addClass(myEditor._getDoc().body, 'myClass'); | |
}); | |
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
<?php | |
/** | |
* YUI Module info from YUILoader | |
*/ | |
$yui_moduleInfo = array( | |
'animation' => array( | |
'type' => 'js', | |
'path' => 'animation/animation-min.js', | |
'requires' => array('dom', 'event') | |
), |
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
<!-- Set this as your default HTML --> | |
<span class="yui-noedit">name</span><span id="field-name"><span><br> | |
<span class="yui-noedit">nickname</span><span id="field-nickname"><span><br> | |
<span class="yui-noedit">address</span><span id="field-address"><span><br> |
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
myEditor = //A reference to your Editor instance | |
//From your submit handler.. | |
var doc = myEditor._getDoc(); | |
var name = doc.getElementById('field-name').innerHTML; | |
var nickname = doc.getElementById('field-nickname').innerHTML; | |
var address = doc.getElementById('field-address').innerHTML; |
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
#!/bin/bash | |
# name this file: git-make-me-a-sammich | |
# then put it in your path | |
# now type: git make-me-a-sammich | |
echo "What kind of sandwich do you want?" | |
read answer | |
echo "I ain't making you a damn $answer sandwich. Now get back to writing code!!" |
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
/** | |
* This example shows how to programatically create a link inside the | |
* YUI Rich Text Editor. | |
*/ | |
var myEditor; //Editor Reference | |
//Focus the window first | |
myEditor.focus(); |
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
if ((typeof res != "undefined" || res != null) && res instanceof YAHOO.util.Resize) { | |
//Set the wrap element on the resize back to zIndex 0 | |
Dom.setStyle(res.getWrapEl(), 'zIndex', 0); | |
res.destroy(); | |
} | |
res = new YAHOO.util.Resize(el, { | |
handles: ['br', 'bl', 'tr', 'tl'], | |
knobHandles: true, | |
height: '30px', |
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 focusedEditor = null; | |
myEditor1.on('editorWindowFocus', function() { | |
focusedEditor = myEditor1; | |
}); | |
myEditor2.on('editorWindowFocus', function() { | |
focusedEditor = myEditor2; | |
}); |