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
(function() { | |
var myEditor = new YAHOO.widget.Editor('editor', { | |
//Config here | |
}); | |
myEditor.on('editorKeyPress', function(e) { | |
alert(e.ev.charCode); | |
}); |
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
(function() { | |
var myEditor = new YAHOO.widget.Editor('foo', { | |
//Your Config | |
}); | |
myEditor.on('afterNodeChange', function() { | |
if (this._hasSelection()) { | |
this.toolbar.enableButton('mybutton'); | |
} else { |
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)) { |
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
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1" prefix="str" %> | |
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> | |
<%@ attribute name="rteData" type="java.lang.String" required="true" %> | |
<%@ attribute name="editorData" type="java.lang.String" required="true" %> | |
<%@ attribute name="formname" type="java.lang.String" required="true" %> | |
<link rel="stylesheet" type="text/css" href="<c:url value='/scripts/yui_2.7.0/yui/build/assets/skins/sam/skin.css'/>" /> | |
<link rel="stylesheet" type="text/css" href="<c:url value='/scripts/yui_2.7.0/yui/build/fonts/fonts-min.css'/>" /> |
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
(function() { | |
var Dom = YAHOO.util.Dom, | |
Event = YAHOO.util.Event; | |
var myConfig = { | |
height: '150px', | |
width: '100%', | |
animate: true, | |
dompath: false, | |
focusAtStart: true |
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
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1" prefix="str" %> | |
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> | |
<%@ attribute name="rteData" type="java.lang.String" required="true" %> | |
<%@ attribute name="editorData" type="java.lang.String" required="true" %> | |
<%@ attribute name="formname" type="java.lang.String" required="true" %> | |
<%@ attribute name="readOnly" type="java.lang.String" required="true" %> | |
<link rel="stylesheet" type="text/css" href="<c:url value='/scripts/yui_2.7.0/yui/build/assets/skins/sam/skin.css'/>" /> |
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/sh | |
#Add to git config, must be full path.. | |
#[diff] | |
# external = "/Users/davglass/.bin/gitdiff.sh" | |
# diff is called by git with 7 parameters: | |
# path old-file old-hex old-mode new-file new-hex new-mode | |
# Assuming that you are using MacVim | |
"/Applications/mvim" "-d" "$2" "$5" | cat |
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-editor-container .dompath span { | |
visibility: hidden; | |
} |
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
SELECT * FROM flickr.photos.search(100) WHERE | |
(text="openhacklondon") | |
AND (safe_search = 1) | |
AND (media = "photos") | |
AND (extras = "o_dims") | |
AND ( | |
(o_width = "1600" AND o_height = "1200") | |
OR (o_width = "1200" AND o_height = "1600") | |
OR (o_width = "800" AND o_height = "600") | |
) |
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 stripHTML = /<\S[^><]*>/g; | |
var html = myEditor.saveHTML(); | |
var text = html.replace(stripHTML, ''); | |
var wordCount = text.match(/\b/g); | |
wordCount = ((wordCount) ? (wordCount.length / 2) : 0); | |