TylerGarlick / angular-redactor

Redactor WYSIWYG directives for redactor editor
MIT License
208 stars 83 forks source link

bugfix: upgrade to version 1.0.1 of redactor #57

Open thinkrapido opened 9 years ago

thinkrapido commented 9 years ago
GAnatoliy commented 9 years ago

Hi, looks that part that prevent collisions with change callback also should be updated. Code example:

  angular.merge(options, redactorOptions, additionalOptions);

  // prevent collision with the constant values on ChangeCallback
  var changeCallback = (additionalOptions.callbacks && additionalOptions.callbacks.change) ||
    (redactorOptions.callbacks && redactorOptions.callbacks.change);
  if (changeCallback) {
    options.callbacks.change = function(value) {
      updateModel.call(this, value);
      changeCallback.call(this, value);
    };
  }