Ember valueBinding to Redactor WYSIWYG

App.RedactorView = Ember.TextArea.extend
  classNames: ['redactor']

  didInsertElement: ->

tpl: {{view Malloc.RedactorView valueBinding=description}}

How can I get the right value

Check the Source of Ember.TextSupport Mixin that setups the event handlers on the text area.

When editing with redactor none of the events of the textarea are fired, as you are not interacting with the textarea but with the reductor_editor div. Thus, you need to set up your own event handlers that update the model. Ideally, reductor would offer something like a change event, that you could use to update the value.

Additionally, if you want to keep redactor up-to-date if the model changes (from somewhere else than redactor). You need to observe the value property.

observeValue: function() {
1 Like