Răsfoiți Sursa

Add explicit editor init event

James Allen 8 ani în urmă
părinte
comite
5d3ecdb924

+ 4 - 2
services/web/public/coffee/ide/editor/directives/aceEditor.coffee

@@ -91,8 +91,8 @@ define [
 					else
 					else
 						editor.setOption('behavioursEnabled', false)
 						editor.setOption('behavioursEnabled', false)
 
 
-				window.editors ||= []
-				window.editors.push editor
+				window._debug_editors ||= []
+				window._debug_editors.push editor
 
 
 				scope.name = attrs.aceEditor
 				scope.name = attrs.aceEditor
 
 
@@ -430,6 +430,8 @@ define [
 				scope.$on '$destroy', () ->
 				scope.$on '$destroy', () ->
 					detachFromAce(scope.sharejsDoc)
 					detachFromAce(scope.sharejsDoc)
 
 
+				scope.$emit "#{scope.name}:inited", editor
+
 			template: """
 			template: """
 				<div class="ace-editor-wrapper">
 				<div class="ace-editor-wrapper">
 					<div
 					<div