Skip to content

Commit a7fb596

Browse files
committed
release v0.7.0
close outsideris#80
1 parent 585abd2 commit a7fb596

6 files changed

Lines changed: 31 additions & 26 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.7.0 (2015-12-11)
2+
* Make compatible with summernote v0.7.0
3+
14
# 0.5.2 (2015-11-29)
25
* fix a broken ngModel binding with angular 1.3
36
[#84](https://github.com/summernote/angular-summernote/issues/84)

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
angular-summernote is just a directive to bind summmernote's all features.
1111
You can use summernote with angular way.
1212

13+
**Since v0.7.x, the version of angular-summernote follows the version of summernote.
14+
So, angular-summernote v0.7.x are compatible with summernote v0.7.x and
15+
and angular-summernote v0.8.x will be compatible with summernote v0.8.x.
16+
Angular-summernote will match only `major.minor` with summernote.
17+
Therefore, angular-summernote v0.7.0 will be compatible with summernote v0.7.0, v0.7.1 and
18+
v0.7.2. Angular-summernote will release patch update, such as v0.7.1, if only angular-summernote has changed.**
19+
1320
## Table of Contents
1421

1522
- [Demo](#demo)
@@ -25,7 +32,7 @@ You can use summernote with angular way.
2532

2633
## Demo
2734

28-
See at [JSFiddle](http://jsfiddle.net/outsider/n8dt4/244/embedded/result%2Chtml%2Cjs%2Ccss/)
35+
See at [JSFiddle](http://jsfiddle.net/outsider/n8dt4/246/embedded/result%2Chtml%2Cjs%2Ccss/)
2936
or run example in projects(need to run `bower install` before run)
3037

3138
## Installation

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-summernote",
33
"description": "AngularJS directive to Summernote",
4-
"version": "0.5.2",
4+
"version": "0.7.0",
55
"main": [
66
"./dist/angular-summernote.js"
77
],

dist/angular-summernote.js

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* angular-summernote v0.5.2 | (c) 2014, 2015 JeongHoon Byun | MIT license */
1+
/* angular-summernote v0.7.0 | (c) 2014, 2015 JeongHoon Byun | MIT license */
22
/* global angular */
33
angular.module('summernote', [])
44

@@ -18,21 +18,22 @@ angular.module('summernote', [])
1818
summernoteConfig.lang = $attrs.lang;
1919
}
2020

21-
summernoteConfig.onInit = $scope.init;
22-
summernoteConfig.onEnter = function(evt) { $scope.enter({evt:evt}); };
23-
summernoteConfig.onFocus = function(evt) { $scope.focus({evt:evt}); };
24-
summernoteConfig.onPaste = function(evt) { $scope.paste({evt:evt}); };
25-
summernoteConfig.onKeyup = function(evt) { $scope.keyup({evt:evt}); };
26-
summernoteConfig.onKeydown = function(evt) { $scope.keydown({evt:evt}); };
21+
var callbacks = {};
22+
callbacks.onInit = $scope.init;
23+
callbacks.onEnter = function(evt) { $scope.enter({evt:evt}); };
24+
callbacks.onFocus = function(evt) { $scope.focus({evt:evt}); };
25+
callbacks.onPaste = function(evt) { $scope.paste({evt:evt}); };
26+
callbacks.onKeyup = function(evt) { $scope.keyup({evt:evt}); };
27+
callbacks.onKeydown = function(evt) { $scope.keydown({evt:evt}); };
2728
if (angular.isDefined($attrs.onImageUpload)) {
28-
summernoteConfig.onImageUpload = function(files) {
29+
callbacks.onImageUpload = function(files) {
2930
$scope.imageUpload({files:files, editable: $scope.editable});
3031
};
3132
}
3233

3334
this.activate = function(scope, element, ngModel) {
3435
var updateNgModel = function() {
35-
var newValue = element.code();
36+
var newValue = element.summernote('code');
3637
if (element.summernote('isEmpty')) { newValue = ''; }
3738
if (ngModel && ngModel.$viewValue !== newValue) {
3839
$timeout(function() {
@@ -41,21 +42,16 @@ angular.module('summernote', [])
4142
}
4243
};
4344

44-
summernoteConfig.onChange = function(contents) {
45+
callbacks.onChange = function(contents) {
4546
if (element.summernote('isEmpty')) { contents = ''; }
4647
updateNgModel();
4748
$scope.change({contents:contents, editable: $scope.editable});
4849
};
49-
summernoteConfig.onBlur = function(evt) {
50+
callbacks.onBlur = function(evt) {
5051
(!summernoteConfig.airMode) && element.blur();
5152
$scope.blur({evt:evt});
5253
};
53-
if (angular.isDefined($attrs.onToolbarClick)) {
54-
element.on('summernote.toolbar.click', function (evt) {
55-
$scope.toolbarClick({evt: evt});
56-
});
57-
}
58-
54+
summernoteConfig.callbacks = callbacks;
5955
element.summernote(summernoteConfig);
6056

6157
var editor$ = element.next('.note-editor'),
@@ -83,7 +79,7 @@ angular.module('summernote', [])
8379

8480
if (ngModel) {
8581
ngModel.$render = function() {
86-
element.code(ngModel.$viewValue || '');
82+
element.summernote('code', ngModel.$viewValue || '');
8783
};
8884
}
8985

@@ -98,15 +94,15 @@ angular.module('summernote', [])
9894
currentElement = element;
9995
// use jquery Event binding instead $on('$destroy') to preserve options data of DOM
10096
element.on('$destroy', function() {
101-
element.destroy();
97+
element.summernote('destroy');
10298
$scope.summernoteDestroyed = true;
10399
});
104100
};
105101

106102
$scope.$on('$destroy', function () {
107103
// when destroying scope directly
108104
if (!$scope.summernoteDestroyed) {
109-
currentElement.destroy();
105+
currentElement.summernote('destroy');
110106
}
111107
});
112108
}])
@@ -131,7 +127,6 @@ angular.module('summernote', [])
131127
keyup: '&onKeyup',
132128
keydown: '&onKeydown',
133129
change: '&onChange',
134-
toolbarClick: '&onToolbarClick',
135130
imageUpload: '&onImageUpload'
136131
},
137132
template: '<div class="summernote"></div>',

dist/angular-summernote.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-summernote",
33
"description": "AngularJS directive to Summernote",
4-
"version": "0.5.2",
4+
"version": "0.7.0",
55
"author": {
66
"name": "\"Outsider\" Jeonghoon Byun",
77
"email": "outsideris@gmail.com",

0 commit comments

Comments
 (0)