angular-ui / ui-tinymce

AngularUI wrapper for TinyMCE
MIT License
488 stars 371 forks source link

unbind refresh event when tinymce element removed #272

Closed renkaixin closed 7 years ago

renkaixin commented 8 years ago

Problem: I need to trigger '$tinymce:refresh' event to rebuild the editor when I sort a list of editors looped by ng-repeat directive. When '$tinymce:refresh' event triggered, listener in uiTinymce received it and create a clone-editor without unbind event listener. This will cause a horrible result when I sort editors frequently.

Reproduce: Click moveUp or moveDown button 2 times then tinymce received 9 event.Plunker

deeg commented 8 years ago

Thanks, sorry for the late response.

I will look at this today and get it merged.