diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-10-01 19:07:10 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-10-01 19:07:10 -0400 |
| commit | ddac735a463278e245e566105ace3e32c723128c (patch) | |
| tree | 7facfe5f237af60265ce1d35b44a32b5a89941ef /public/assets/javascripts/ui/editor/TextEditor.js | |
| parent | 59968931216c449aebdabcfb25b9792fdbbe8931 (diff) | |
stubbing in text editor stuff
Diffstat (limited to 'public/assets/javascripts/ui/editor/TextEditor.js')
| -rw-r--r-- | public/assets/javascripts/ui/editor/TextEditor.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/public/assets/javascripts/ui/editor/TextEditor.js b/public/assets/javascripts/ui/editor/TextEditor.js new file mode 100644 index 0000000..0319a31 --- /dev/null +++ b/public/assets/javascripts/ui/editor/TextEditor.js @@ -0,0 +1,41 @@ + +var TextEditor = FormView.extend({ + el: "#textEditor", + + events: { + "keydown": 'taint', + "focus [name]": "clearMinotaur", + "mousedown": "stopPropagation", + "change [name=font-family]": 'changeFontFamily', + "change [name=font-size]": 'changeFontSize', + "input [name=text-body]": 'changeText', + "click [data-role=destroy-media]": "destroy", + }, + + initialize: function(opt){ + this.parent = opt.parent + this.__super__.initialize.call(this) + + this.$fontFamily = this.$("[name=font-family]") + this.$fontSize = this.$("[name=font-size]") + this.$textBody = this.$("[name=text-body]") + }, + + toggle: function(state){ + this.$el.toggleClass("active", state); + }, + + taint: function(e){ + e.stopPropagation() + }, + + changeFontFamily: function(){ + }, + + changeFontSize: function(){ + }, + + changeText: function(){ + }, + +}) |
