@@ -86,7 +86,8 @@ ops.OpInsertImage = function OpInsertImage() {
8686 var odtDocument = /**@type {ops.OdtDocument }*/ ( document ) ,
8787 odfCanvas = odtDocument . getOdfCanvas ( ) ,
8888 domPosition = odtDocument . getTextNodeAtStep ( position , memberid ) ,
89- textNode , refNode , paragraphElement , frameElement ;
89+ textNode , refNode , paragraphElement , frameElement ,
90+ events = [ ] ;
9091
9192 if ( ! domPosition ) {
9293 return null ;
@@ -98,7 +99,7 @@ ops.OpInsertImage = function OpInsertImage() {
9899 textNode . splitText ( domPosition . offset ) : textNode . nextSibling ;
99100 frameElement = createFrameElement ( odtDocument . getDOMDocument ( ) ) ;
100101 textNode . parentNode . insertBefore ( frameElement , refNode ) ;
101- odtDocument . handleStepsInserted ( { position : position } ) ;
102+ odtDocument . handleStepsInserted ( { position : position } , events ) ;
102103
103104 // clean up any empty text node which was created by odtDocument.getTextNodeAtStep
104105 if ( textNode . length === 0 ) {
@@ -109,14 +110,16 @@ ops.OpInsertImage = function OpInsertImage() {
109110 odfCanvas . refreshCSS ( ) ;
110111 odfCanvas . rerenderAnnotations ( ) ;
111112
112- return [ {
113+ events . push ( {
113114 eventid : ops . OdtDocument . signalParagraphChanged ,
114115 args : {
115116 paragraphElement : paragraphElement ,
116117 memberId : memberid ,
117118 timeStamp : timestamp
118119 }
119- } ] ;
120+ } ) ;
121+
122+ return events ;
120123 } ;
121124
122125 /**
0 commit comments