diff --git a/app/pods/components/forms/species-form/template.hbs b/app/pods/components/forms/species-form/template.hbs
index 132c089..011f62f 100644
--- a/app/pods/components/forms/species-form/template.hbs
+++ b/app/pods/components/forms/species-form/template.hbs
@@ -26,7 +26,7 @@
@@ -45,7 +45,7 @@
- {{textarea value=strain.notes cols="70" rows="5"}}
+ {{text-editor value=strain.notes}}
diff --git a/app/pods/components/text-editor/component.js b/app/pods/components/text-editor/component.js
new file mode 100644
index 0000000..07c8f7a
--- /dev/null
+++ b/app/pods/components/text-editor/component.js
@@ -0,0 +1,32 @@
+import Ember from 'ember';
+/* global Quill */
+
+export default Ember.Component.extend({
+ quill: null,
+ value: null, // passed in
+
+ didInsertElement: function() {
+ let quill = new Quill(`#${this.get('elementId')} .editor`, {
+ formats: ['bold', 'italic', 'underline'],
+ modules: {
+ 'toolbar': { container: `#${this.get('elementId')} .toolbar` }
+ },
+ theme: 'snow'
+ });
+
+ let val = this.get('value');
+ if (!val) {
+ val = '';
+ }
+ quill.setHTML(val);
+
+ quill.on('text-change', (delta, source) => {
+ if (source === 'user') {
+ this.set('value', Ember.$(quill.getHTML()).html());
+ }
+ });
+
+ this.set('quill', quill);
+ },
+
+});
diff --git a/app/pods/components/text-editor/template.hbs b/app/pods/components/text-editor/template.hbs
new file mode 100644
index 0000000..dfadffd
--- /dev/null
+++ b/app/pods/components/text-editor/template.hbs
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/pods/protected/species/show/template.hbs b/app/pods/protected/species/show/template.hbs
index fac3273..6d7252f 100644
--- a/app/pods/protected/species/show/template.hbs
+++ b/app/pods/protected/species/show/template.hbs
@@ -34,7 +34,7 @@
- Etymology
-
- {{model.etymology}}
+ {{{model.etymology}}}
diff --git a/app/pods/protected/strains/edit/controller.js b/app/pods/protected/strains/edit/controller.js
index e570dff..02e76a4 100644
--- a/app/pods/protected/strains/edit/controller.js
+++ b/app/pods/protected/strains/edit/controller.js
@@ -18,7 +18,7 @@ export default Ember.Controller.extend({
},
cancel: function() {
- let strain = this.get('protected.strain');
+ let strain = this.get('strain');
strain.get('errors').clear();
strain.rollback();
diff --git a/app/pods/protected/strains/show/template.hbs b/app/pods/protected/strains/show/template.hbs
index 1ba5fe6..1b96c8a 100644
--- a/app/pods/protected/strains/show/template.hbs
+++ b/app/pods/protected/strains/show/template.hbs
@@ -49,7 +49,7 @@