Skip to content

Commit 96fb737

Browse files
Merge pull request #11 from shashankaccolite/v.3
Jquery references removed.
2 parents 51c88cf + 3143c8d commit 96fb737

File tree

7 files changed

+7
-23
lines changed

7 files changed

+7
-23
lines changed

.jshintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"browser": true,
2121
"devel": true,
2222
"jasmine": true,
23-
"jquery": true,
2423
// Custom Globals
2524
"globals": {
2625
"module": true,

Gruntfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ module.exports = function(grunt) {
2929
browsers: ['PhantomJS'],
3030
files: [
3131
'node_modules/sinon/pkg/sinon.js',
32-
'bower_components/jquery/dist/jquery.js',
3332
'bower_components/angular/angular.js',
3433
'bower_components/angular-mocks/angular-mocks.js',
3534
'src/**/*.js',

bower.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@
1313
"text",
1414
"editor",
1515
"wysiwyg",
16-
"jquery-plugin",
1716
"rich editor",
1817
"rich text editor",
1918
"rte",
2019
"javascript",
21-
"jquery"
2220
],
2321
"license": "MIT",
2422
"ignore": [

demo/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
charCounterCount: false,
1414
toolbarInline: true,
1515
events: {
16-
'froalaEditor.initialized': function() {
16+
'initialized': function() {
1717
console.log('initialized');
1818
}
1919
}
@@ -22,7 +22,7 @@
2222
$scope.initialize = function(initControls) {
2323
$scope.initControls = initControls;
2424
$scope.deleteAll = function() {
25-
initControls.getEditor()('html.set', '');
25+
initControls.getEditor().html.set('');
2626
};
2727
};
2828

demo/index.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@
66
<head>
77
<meta charset="utf-8">
88
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0"/>
9-
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
109

11-
<!-- Include Font Awesome. -->
12-
<link href="../node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
13-
14-
<!-- Include Froala Editor styles -->
10+
<!-- Include Froala Editor styles -->
1511
<link rel="stylesheet" href="../bower_components/froala-wysiwyg-editor/css/froala_editor.min.css" />
1612
<link rel="stylesheet" href="../bower_components/froala-wysiwyg-editor/css/froala_style.min.css" />
1713

@@ -29,7 +25,7 @@
2925
<link rel="stylesheet" href="../bower_components/froala-wysiwyg-editor/css/plugins/video.css">
3026

3127
<!-- Include Froala Editor -->
32-
<script src="../bower_components/froala-wysiwyg-editor/js/froala_editor.min.js"></script>
28+
<script src="../bower_components/froala-wysiwyg-editor/js/froala_editor.pkgd.min.js"></script>
3329

3430
<!-- Include Froala Editor Plugins -->
3531
<script src="../bower_components/froala-wysiwyg-editor/js/plugins/align.min.js"></script>
@@ -58,7 +54,6 @@
5854
<!-- End Froala -->
5955

6056
<script src="../bower_components/angular/angular.min.js"></script>
61-
6257
<script src="../src/angular-froala.js"></script>
6358
<script src="app.js"></script>
6459
<link rel="stylesheet" href="app.css">

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
"text",
1818
"editor",
1919
"wysisyg",
20-
"jquery-plugin",
2120
"rich editor",
2221
"rich text editor",
2322
"rte",
2423
"javascript",
25-
"jquery"
2624
],
2725
"contributors": [
2826
"Cameron Gallarno <[email protected]>",

src/angular-froala.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function(window, angular, jQuery, undefined) {
1+
(function(window, angular, undefined) {
22
'use strict';
33

44
angular.module('froala', [])
@@ -30,13 +30,12 @@
3030
require: 'ngModel',
3131
scope: scope,
3232
link: function(scope, element, attrs, ngModel) {
33-
if (jQuery){ element = jQuery(element);
3433
// Create a blur event to update the data of ngModel
3534
element.on('blur', function () {
3635
ngModel.$setViewValue(element.innerHTML.text())
3736
});
3837

39-
}
38+
4039
var specialTag = false;
4140
if (SPECIAL_TAGS.indexOf(element.prop("tagName").toLowerCase()) != -1) {
4241
specialTag = true;
@@ -95,10 +94,6 @@
9594
return true;
9695
}
9796

98-
if (ctrl.editorInitialized) {
99-
return element.froalaEditor.node.isEmpty(jQuery('<div>' + value + '</div>')).get(0);
100-
}
101-
10297
return true;
10398
};
10499
};
@@ -238,4 +233,4 @@
238233
}
239234
};
240235
}]);
241-
})(window, window.angular, window.jQuery);
236+
})(window, window.angular);

0 commit comments

Comments
 (0)