hsborges / bibtex-normalizer

Bibtex Normalizer - Normalizing BibTeX entries to a common format

Home Page:https://hsborges.github.io/bibtex-normalizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. ember-cli-build.js: pre-config
new EmberApp(defaults, {
  ace: {
      themes: [''],
      modes: [''],
      workers: ['']
    }
});
  1. app/templates/editor.hbs: layout
{{ember-ace id="div-id" mode="lang-highlighter" lines=30}}
  1. app/styles/editor.scss: font-size
.app-editor {

  pre.ace_editor {
    font-size: 20px;
  }
}
  1. 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') || '');
  }
}