Ghost/ghost/admin/helpers/gh-count-down-characters.js
Fabian Becker 8616a45c3c Meta data screen
closes #3939
- Add Seo Tab component to PSM
- Add new gh-blur-textarea component
- Refactor blur-input to use new text-input mixin
2014-09-21 15:13:06 +00:00

17 lines
473 B
JavaScript

var countDownCharacters = Ember.Handlebars.makeBoundHelper(function (content, maxCharacters) {
var el = document.createElement('span'),
length = content ? content.length : 0;
el.className = 'word-count';
if (length > maxCharacters) {
el.style.color = '#E25440';
} else {
el.style.color = '#9E9D95';
}
el.innerHTML = length;
return new Ember.Handlebars.SafeString(el.outerHTML);
});
export default countDownCharacters;