File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed
Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 1313 charCounterCount : false ,
1414 toolbarInline : true ,
1515 events : {
16- 'initialized' : function ( ) {
17- console . log ( 'initialized' ) ;
16+ 'contentChanged' :function ( e , editor ) {
17+ console . log ( 'content changed' , $scope . titleOptions . froalaEditor . html . get ( ) ) ;
18+ } ,
19+ 'initialized' : function ( editor ) {
20+ console . log ( 'initialized' , this ) ;
1821 }
1922 }
2023 } ;
2124
2225 $scope . initialize = function ( initControls ) {
2326 $scope . initControls = initControls ;
2427 $scope . deleteAll = function ( ) {
25- initControls . getEditor ( ) . html . set ( '' ) ;
28+ initControls . getEditor ( ) . html . set ( '34434 ' ) ;
2629 } ;
2730 } ;
2831
Original file line number Diff line number Diff line change 11{
22 "name" : " angular-froala" ,
3- "version" : " 3.0.0-rc.2" ,
3+ "version" : " 3.0.0-rc.2-1 " ,
44 "description" : " Angular.js bindings for Froala WYSIWYG HTML rich text editor" ,
55 "main" : " src/angular-froala.js" ,
66 "scripts" : {
5050 },
5151 "dependencies" : {
5252 "coffee-script" : " ^1.12.7" ,
53- "froala-editor" : " 3.0.0-rc.1 "
53+ "froala-editor" : " 3.0.0-rc.2 "
5454 }
5555}
Original file line number Diff line number Diff line change 107107 ngModel . $render ( )
108108 } ) ;
109109
110- ctrl . registerEventsWithCallbacks ( 'initialized' , function ( ) {
111- ctrl . editorInitialized = true ;
112- ngModel . $render ( )
113- } )
114-
115110 ctrl . registerEventsWithCallbacks ( 'initialized' , ctrl . options . events && ctrl . options . events . initialized )
116-
111+ var initEvent = ctrl . options . events . initialized ;
117112 if ( ! ctrl . options . events ) ctrl . options . events = { } ;
118113 ctrl . options . events . initialized = function ( ) {
114+ initEvent && initEvent ( ) ;
119115 ctrl . initListeners ( ) ;
116+ ctrl . editorInitialized = true ;
117+ ngModel . $render ( )
120118 }
121119
122120 ctrl . froalaEditor = new FroalaEditor ( element [ 0 ] , ctrl . options ) ;
123- element . innerHTML = ctrl . froalaElement = ctrl . froalaEditor . $el [ 0 ] ;
121+ element [ 0 ] . innerHTML = ctrl . froalaElement = ctrl . froalaEditor . $el [ 0 ] ;
124122
125123 //assign the froala instance to the options object to make methods available in parent scope
126124 if ( scope . froalaOptions ) {
You can’t perform that action at this time.
0 commit comments