- see https://gist.github.com/machty/5723945 for the latest API (unlikely to change from now on)
- latest Ember build: https://machty.s3.amazonaws.com/ember/ember-async-routing-10.js
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 overlay provides a 'liquid' mode to the excellent CodeMirror editor (http://codemirror.net/). | |
Add something like this to your CSS: | |
.cm-liquid-tag { | |
color: #32273f; | |
background: #ead9ff; | |
} | |
.cm-liquid-variable { |
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
# So, this is pretty horrible. If we just encode using btoa, any UTF-8 chars cause an error. | |
# If we use either of the workarounds on MDN[1], the £ sign is encoded wrong. I suspect | |
# Excel totally sucking at encodings is the reason why. So, the workaround is, to use | |
# the MDN workaround on chars with values > 255, and allow chars 0-255 to be encoded | |
# as is with btoa. Note that if you use either of the workarounds on MDN, chars | |
# 128-255 will be encoded as UTF-8, which includeds the £ sign. This will cause excel | |
# to choke on these chars. Excel will still choke on chars > 255, but at least the £ | |
# sign works now... | |
# [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding |
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
class Frame extends Component { | |
componentDidMount() { | |
this.iframeHead = this.node.contentDocument.head | |
this.iframeRoot = this.node.contentDocument.body | |
this.forceUpdate() | |
} | |
render() { | |
const { children, head, ...rest } = this.props | |
return ( |