Skip to content

Instantly share code, notes, and snippets.

@jwlawrence
Created December 6, 2017 02:44
Show Gist options
  • Save jwlawrence/f82720f0c41023c2afaa473511b38397 to your computer and use it in GitHub Desktop.
Save jwlawrence/f82720f0c41023c2afaa473511b38397 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
value: JSON.stringify({
"title": "Person",
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"age": {
"description": "Age in years",
"type": "integer",
"minimum": 0
}
},
"required": ["firstName", "lastName"]
}, null, '\t'),
mode: 'ace/mode/javascript',
theme: 'ace/theme/monokai',
tabSize: 2,
useSoftTabs: true,
wrap: true,
showInvisibles: false,
showGutter: true,
highlightActiveLine: true,
showPrintMargin: true,
readOnly: false,
enableDefaultAutocompletion: true,
actions: {
valueUpdated(newVal) {
this.set('value', newVal);
}
}
});
{{ember-ace
lines=21
value=value
highlightActiveLine=highlightActiveLine
readOnly=readOnly
tabSize=tabSize
useSoftTabs=useSoftTabs
showInvisibles=showInvisibles
showGutter=showGutter
theme=theme
update=(action 'valueUpdated')
}}
{{value}}
{
"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"
},
"addons": {
"ember-data": "2.12.1",
"ember-ace": "1.2.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment