Fancy editor for "editor" router
paulo-carvalho opened this issue · comments
Substitute textarea tag for something fancier (try searching for some bower-based framework).
Suggestion: Ace ember install ember-ace - last commit 2 months ago
How Ace Editor was used:
- ember-cli-build.js: pre-config
new EmberApp(defaults, {
ace: {
themes: [''],
modes: [''],
workers: ['']
}
});
- app/templates/editor.hbs: layout
{{ember-ace id="div-id" mode="lang-highlighter" lines=30}}
- app/styles/editor.scss: font-size
.app-editor {
pre.ace_editor {
font-size: 20px;
}
}
- app/controllers/editor.js: bind content
actions: {
clear() {
ace.edit("formatter").setValue("");
},
normalize() {
const input = ace.edit("formatter").getValue();
},
buildEditor() {
const bibtex = this.get('formatter').get('bibtex');
ace.edit("formatter").setValue(bibtex.get('bibtex') || '');
}
}