Forked from knownasilya/components.template-tag.js
Last active
April 6, 2017 22:37
-
-
Save bantic/394d5bf2b8894e0de391ebbf76249891 to your computer and use it in GitHub Desktop.
mobiledoc template fill in
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'span', | |
classNames: ['template-tag'], | |
click() { | |
let tag = this.get('tag'); | |
let promise = this.get('onClick')(tag); | |
promise.then((tagVal) => { | |
tag.setProperties({ | |
tag: tagVal, | |
value: tagVal | |
}); | |
}); | |
} | |
}); |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
tags: ['firstName', 'lastName', 'email'], | |
template: '' | |
}); |
This file contains hidden or 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
import Ember from 'ember'; | |
export function eq([val1, val2]/*, hash*/) { | |
return val1 === val2; | |
} | |
export default Ember.Helper.helper(eq); |
This file contains hidden or 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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.template-tags-input { | |
background-color: #efefef; | |
line-height: 1.5; | |
} | |
.template-tag { | |
color: tomato; | |
} |
This file contains hidden or 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
{ | |
"version": "0.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0", | |
"mobiledoc-kit": "https://unpkg.com/[email protected]/dist/global/mobiledoc-kit.js" | |
}, | |
"addons": { | |
"ember-data": "2.12.1", | |
"ember-basic-dropdown": "0.31.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment