Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Major fixes to callback syncing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sidyadav committed Feb 12, 2015
1 parent e2c3abc commit bd75450
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions angular-redactor-filepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,19 @@ RedactorPlugins.filepicker = function() {
require: 'ngModel',
link: function(scope, element, attrs, ngModel) {

// Expose scope var with loaded state of Redactor
// Expose scope var with loaded state of Redactor
scope.redactorLoaded = false;

var updateModel = function updateModel(value) {
// $timeout to avoid $digest collision
$timeout(function() {
scope.$apply(function() {
ngModel.$setViewValue(value);
});
});
var updateModel = function() {
scope.$apply(ngModel.$setViewValue($_element.redactor('code.get')));
},
options = {
changeCallback: updateModel,
keyupCallback: updateModel,
keydownCallback: updateModel,
execCommandCallback: updateModel,
autosaveCallback: updateModel,
focusCallback: updateModel,
blurCallback: updateModel,
plugins: ['filepicker', 'fullscreen'],
buttons: ['html', 'bold', 'italic', 'deleted', 'outdent', 'indent', 'image', 'file', 'link', 'alignment', 'horizontalrule']
},
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-redactor-filepicker",
"main": "angular-redactor-filepicker.js",
"version": "1.8.0",
"version": "2.0.0",
"homepage": "https://github.com/UseFedora/angular-redactor",
"authors": [
"Tyler Garlick <[email protected]>",
Expand Down

0 comments on commit bd75450

Please sign in to comment.