angular-summernote
Advanced tools
Comparing version
{ | ||
"name": "angular-summernote", | ||
"description": "AngularJS directive to Summernote", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"main": [ | ||
@@ -6,0 +6,0 @@ "./dist/angular-summernote.js" |
@@ -0,1 +1,5 @@ | ||
# 0.5.2 (2015-11-29) | ||
* fix a broken ngModel binding with angular 1.3 | ||
[#84](https://github.com/summernote/angular-summernote/issues/84) | ||
# 0.5.1 (2015-10-05) | ||
@@ -2,0 +6,0 @@ * Support initial text from inner markup in directive |
@@ -1,6 +0,2 @@ | ||
/** | ||
* Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> | ||
* Licensed under the MIT license. | ||
* <http://outsider.mit-license.org/> | ||
*/ | ||
/* angular-summernote v0.5.2 | (c) 2014, 2015 JeongHoon Byun | MIT license */ | ||
/* global angular */ | ||
@@ -124,3 +120,3 @@ angular.module('summernote', []) | ||
replace: true, | ||
require: ['summernote', '^?ngModel'], | ||
require: ['summernote', '?ngModel'], | ||
controller: 'SummernoteController', | ||
@@ -127,0 +123,0 @@ scope: { |
@@ -1,6 +0,2 @@ | ||
/* | ||
angular-summernote v0.5.1 | ||
Copyright 2015 Jeonghoon Byun | ||
License: MIT | ||
*/ | ||
angular.module("summernote",[]).controller("SummernoteController",["$scope","$attrs","$timeout",function($scope,$attrs,$timeout){"use strict";var currentElement,summernoteConfig=$scope.summernoteConfig||{};if(angular.isDefined($attrs.height)&&(summernoteConfig.height=$attrs.height),angular.isDefined($attrs.focus)&&(summernoteConfig.focus=!0),angular.isDefined($attrs.airmode)&&(summernoteConfig.airMode=!0),angular.isDefined($attrs.lang)){if(!angular.isDefined($.summernote.lang[$attrs.lang]))throw new Error('"'+$attrs.lang+'" lang file must be exist.');summernoteConfig.lang=$attrs.lang}summernoteConfig.onInit=$scope.init,summernoteConfig.onEnter=function(evt){$scope.enter({evt:evt})},summernoteConfig.onFocus=function(evt){$scope.focus({evt:evt})},summernoteConfig.onPaste=function(evt){$scope.paste({evt:evt})},summernoteConfig.onKeyup=function(evt){$scope.keyup({evt:evt})},summernoteConfig.onKeydown=function(evt){$scope.keydown({evt:evt})},angular.isDefined($attrs.onImageUpload)&&(summernoteConfig.onImageUpload=function(files){$scope.imageUpload({files:files,editable:$scope.editable})}),this.activate=function(scope,element,ngModel){var updateNgModel=function(){var newValue=element.code();element.summernote("isEmpty")&&(newValue=""),ngModel&&ngModel.$viewValue!==newValue&&$timeout(function(){ngModel.$setViewValue(newValue)},0)};summernoteConfig.onChange=function(contents){element.summernote("isEmpty")&&(contents=""),updateNgModel(),$scope.change({contents:contents,editable:$scope.editable})},summernoteConfig.onBlur=function(evt){!summernoteConfig.airMode&&element.blur(),$scope.blur({evt:evt})},angular.isDefined($attrs.onToolbarClick)&&element.on("summernote.toolbar.click",function(evt){$scope.toolbarClick({evt:evt})}),element.summernote(summernoteConfig);var unwatchNgModel,editor$=element.next(".note-editor");editor$.find(".note-toolbar").click(function(){updateNgModel(),editor$.hasClass("codeview")?(editor$.on("keyup",updateNgModel),ngModel&&(unwatchNgModel=scope.$watch(function(){return ngModel.$modelValue},function(newValue){editor$.find(".note-codable").val(newValue)}))):(editor$.off("keyup",updateNgModel),angular.isFunction(unwatchNgModel)&&unwatchNgModel())}),ngModel&&(ngModel.$render=function(){element.code(ngModel.$viewValue||"")}),angular.isDefined($attrs.editable)&&($scope.editable=editor$.find(".note-editable")),angular.isDefined($attrs.editor)&&($scope.editor=element),currentElement=element,element.on("$destroy",function(){element.destroy(),$scope.summernoteDestroyed=!0})},$scope.$on("$destroy",function(){$scope.summernoteDestroyed||currentElement.destroy()})}]).directive("summernote",[function(){"use strict";return{restrict:"EA",transclude:"element",replace:!0,require:["summernote","^?ngModel"],controller:"SummernoteController",scope:{summernoteConfig:"=config",editable:"=",editor:"=",init:"&onInit",enter:"&onEnter",focus:"&onFocus",blur:"&onBlur",paste:"&onPaste",keyup:"&onKeyup",keydown:"&onKeydown",change:"&onChange",toolbarClick:"&onToolbarClick",imageUpload:"&onImageUpload"},template:'<div class="summernote"></div>',link:function(scope,element,attrs,ctrls,transclude){var summernoteController=ctrls[0],ngModel=ctrls[1];transclude(scope,function(clone,scope){element.append(clone.html())}),summernoteController.activate(scope,element,ngModel)}}}]); | ||
/* angular-summernote v0.5.2 | (c) 2014, 2015 JeongHoon Byun | MIT license */ | ||
angular.module("summernote",[]).controller("SummernoteController",["$scope","$attrs","$timeout",function($scope,$attrs,$timeout){"use strict";var currentElement,summernoteConfig=$scope.summernoteConfig||{};if(angular.isDefined($attrs.height)&&(summernoteConfig.height=$attrs.height),angular.isDefined($attrs.focus)&&(summernoteConfig.focus=!0),angular.isDefined($attrs.airmode)&&(summernoteConfig.airMode=!0),angular.isDefined($attrs.lang)){if(!angular.isDefined($.summernote.lang[$attrs.lang]))throw new Error('"'+$attrs.lang+'" lang file must be exist.');summernoteConfig.lang=$attrs.lang}summernoteConfig.onInit=$scope.init,summernoteConfig.onEnter=function(evt){$scope.enter({evt:evt})},summernoteConfig.onFocus=function(evt){$scope.focus({evt:evt})},summernoteConfig.onPaste=function(evt){$scope.paste({evt:evt})},summernoteConfig.onKeyup=function(evt){$scope.keyup({evt:evt})},summernoteConfig.onKeydown=function(evt){$scope.keydown({evt:evt})},angular.isDefined($attrs.onImageUpload)&&(summernoteConfig.onImageUpload=function(files){$scope.imageUpload({files:files,editable:$scope.editable})}),this.activate=function(scope,element,ngModel){var updateNgModel=function(){var newValue=element.code();element.summernote("isEmpty")&&(newValue=""),ngModel&&ngModel.$viewValue!==newValue&&$timeout(function(){ngModel.$setViewValue(newValue)},0)};summernoteConfig.onChange=function(contents){element.summernote("isEmpty")&&(contents=""),updateNgModel(),$scope.change({contents:contents,editable:$scope.editable})},summernoteConfig.onBlur=function(evt){!summernoteConfig.airMode&&element.blur(),$scope.blur({evt:evt})},angular.isDefined($attrs.onToolbarClick)&&element.on("summernote.toolbar.click",function(evt){$scope.toolbarClick({evt:evt})}),element.summernote(summernoteConfig);var unwatchNgModel,editor$=element.next(".note-editor");editor$.find(".note-toolbar").click(function(){updateNgModel(),editor$.hasClass("codeview")?(editor$.on("keyup",updateNgModel),ngModel&&(unwatchNgModel=scope.$watch(function(){return ngModel.$modelValue},function(newValue){editor$.find(".note-codable").val(newValue)}))):(editor$.off("keyup",updateNgModel),angular.isFunction(unwatchNgModel)&&unwatchNgModel())}),ngModel&&(ngModel.$render=function(){element.code(ngModel.$viewValue||"")}),angular.isDefined($attrs.editable)&&($scope.editable=editor$.find(".note-editable")),angular.isDefined($attrs.editor)&&($scope.editor=element),currentElement=element,element.on("$destroy",function(){element.destroy(),$scope.summernoteDestroyed=!0})},$scope.$on("$destroy",function(){$scope.summernoteDestroyed||currentElement.destroy()})}]).directive("summernote",[function(){"use strict";return{restrict:"EA",transclude:"element",replace:!0,require:["summernote","?ngModel"],controller:"SummernoteController",scope:{summernoteConfig:"=config",editable:"=",editor:"=",init:"&onInit",enter:"&onEnter",focus:"&onFocus",blur:"&onBlur",paste:"&onPaste",keyup:"&onKeyup",keydown:"&onKeydown",change:"&onChange",toolbarClick:"&onToolbarClick",imageUpload:"&onImageUpload"},template:'<div class="summernote"></div>',link:function(scope,element,attrs,ctrls,transclude){var summernoteController=ctrls[0],ngModel=ctrls[1];transclude(scope,function(clone,scope){element.append(clone.html())}),summernoteController.activate(scope,element,ngModel)}}}]); |
{ | ||
"name": "angular-summernote", | ||
"description": "AngularJS directive to Summernote", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"author": { | ||
@@ -17,2 +17,7 @@ "name": "\"Outsider\" Jeonghoon Byun", | ||
], | ||
"homepage": "https://github.com/summernote/angular-summernote", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/outsideris/involved.git" | ||
}, | ||
"licenses": [ | ||
@@ -25,26 +30,25 @@ { | ||
"devDependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-concat": "^0.5.0", | ||
"grunt-contrib-jshint": "~0.11.0", | ||
"grunt-contrib-connect": "~0.11.0", | ||
"grunt-contrib-watch": "~0.6.1", | ||
"grunt-contrib-compress": "^0.13.0", | ||
"load-grunt-tasks": "^3.0.0", | ||
"mocha": "~2.2.0", | ||
"karma-script-launcher": "~0.1.0", | ||
"del": "^2.1.0", | ||
"gulp": "^3.9.0", | ||
"gulp-coveralls": "^0.1.4", | ||
"gulp-header": "^1.7.1", | ||
"gulp-jshint": "^1.11.2", | ||
"gulp-nuget-pack": "0.0.6", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-uglify": "^1.4.2", | ||
"jshint-stylish": "^2.0.1", | ||
"karma": "~0.13.9", | ||
"karma-chrome-launcher": "~0.2.0", | ||
"karma-coffee-preprocessor": "~0.3.0", | ||
"karma-coverage": "^0.5.0", | ||
"karma-firefox-launcher": "~0.1.3", | ||
"karma-html2js-preprocessor": "~0.1.0", | ||
"requirejs": "~2.1.10", | ||
"karma-mocha": "~0.2.0", | ||
"karma-phantomjs-launcher": "~0.2.0", | ||
"karma-requirejs": "~0.2.1", | ||
"karma-coffee-preprocessor": "~0.3.0", | ||
"karma-phantomjs-launcher": "~0.2.0", | ||
"karma": "~0.13.9", | ||
"karma-mocha": "~0.2.0", | ||
"grunt-karma": "~0.12.0", | ||
"grunt-contrib-uglify": "~0.9.0", | ||
"grunt-karma-coveralls": "^2.5.1", | ||
"karma-coverage": "^0.5.0" | ||
"karma-script-launcher": "~0.1.0", | ||
"mocha": "~2.2.0", | ||
"requirejs": "~2.1.10" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -28,3 +28,3 @@ # angular-summernote - [AngularJS](http://angularjs.org/) directive to [Summernote](http://summernote.org/) | ||
See at [JSFiddle](http://jsfiddle.net/outsider/n8dt4/231/embedded/result%2Chtml%2Cjs%2Ccss/) | ||
See at [JSFiddle](http://jsfiddle.net/outsider/n8dt4/244/embedded/result%2Chtml%2Cjs%2Ccss/) | ||
or run example in projects(need to run `bower install` before run) | ||
@@ -31,0 +31,0 @@ |
@@ -1,6 +0,1 @@ | ||
/** | ||
* Copyright (c) 2013 JeongHoon Byun aka "Outsider", <http://blog.outsider.ne.kr/> | ||
* Licensed under the MIT license. | ||
* <http://outsider.mit-license.org/> | ||
*/ | ||
/* global angular */ | ||
@@ -124,3 +119,3 @@ angular.module('summernote', []) | ||
replace: true, | ||
require: ['summernote', '^?ngModel'], | ||
require: ['summernote', '?ngModel'], | ||
controller: 'SummernoteController', | ||
@@ -127,0 +122,0 @@ scope: { |
@@ -17,2 +17,3 @@ // Karma configuration | ||
'../examples/components/summernote/dist/summernote.min.js', | ||
'lang/summernote-de-DE.js', | ||
'../examples/components/angular-1.2/index.js', | ||
@@ -19,0 +20,0 @@ |
@@ -17,2 +17,3 @@ // Karma configuration | ||
'../examples/components/summernote/dist/summernote.min.js', | ||
'lang/summernote-de-DE.js', | ||
'../examples/components/angular-1.3/index.js', | ||
@@ -19,0 +20,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
21
-4.55%1
-50%131598
-1.53%31
-6.06%1218
-1.06%