File tree Expand file tree Collapse file tree 3 files changed +30
-6
lines changed Expand file tree Collapse file tree 3 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,32 @@ function myCtrl($scope){
6161$scope .froalaOptions .froala (" getSelection" );
6262` ` `
6363###Events
64- - todo
64+ Events can be used one of two ways as an attribute on the directive, or passed in with the options.
65+ ####Attribute
66+ _app.js_
67+
68+ ` ` ` js
69+ $scope .editorOnFocus = function (e , editor ){
70+ // Do Something
71+ }
72+ ` ` `
73+ _view.html_
74+
75+ ` ` ` html
76+ < textarea froala= " froalaOptions" ngModel= " myHtml" froala- event - focus= " editorOnFocus" >< / textarea>
77+ ` ` `
78+ ###options
79+ _app.js_
80+
81+ ` ` ` js
82+ $scope .froalaOptions = {
83+ inlineMode: false ,
84+ placeholder: " Edit Me" ,
85+ events : {
86+ focus : function (e , editor ) {/* ... */ }
87+ }
88+ ` ` `
89+
6590
6691###Displaying Html
6792
Original file line number Diff line number Diff line change 2020 } ;
2121
2222 $scope . onPaste = function ( e , editor , html ) {
23- return 'Hijacked ' + html ;
24- }
23+ // return 'Hijacked ' + html;
24+ } ;
2525
2626 $scope . onEvent = function ( e , editor , a , b ) {
2727 console . log ( 'onEvent' , e . namespace , a , b ) ;
28- }
28+ } ;
2929
3030 } ) ;
Original file line number Diff line number Diff line change 1212 < link rel ="stylesheet " href ="../bower_components/FroalaWysiwygEditor/css/froala_style.min.css " />
1313
1414 < script src ="../bower_components/FroalaWysiwygEditor/js/froala_editor.min.js "> </ script >
15- < script src ="../bower_components/FroalaWysiwygEditor/js/froala_style.min.js "> </ script >
16- < script src ="../bower_components/FroalaWysiwygEditor/js/froala_content.min.js "> </ script >
15+
1716 <!-- Froala Plugins -->
1817 < script src ="../bower_components/FroalaWysiwygEditor/js/plugins/tables.min.js "> </ script >
1918 < script src ="../bower_components/FroalaWysiwygEditor/js/plugins/video.min.js "> </ script >
You can’t perform that action at this time.
0 commit comments