React to content change event dispatched by plugin
The editor view must listen for the content-change event in order to
react to changes made by the codemirror-editor plugin. Updating the
value of _newContent in the view-level component is used for:
- Enabling/disabling the save button
- Caching edits to localStorage (TODO)
- Probably many more things
Bug: Issue 4437
Change-Id: I81b7db5dea9a40ddaeee9924428ffcd78f4abf4a
diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.html b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.html
index 1dade20..10da09b 100644
--- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.html
+++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.html
@@ -83,7 +83,7 @@
</header>
</gr-fixed-panel>
<div class="textareaWrapper">
- <gr-endpoint-decorator name="editor">
+ <gr-endpoint-decorator id="editorEndpoint" name="editor">
<gr-endpoint-param name="fileContent" value="[[_newContent]]"></gr-endpoint-param>
<gr-endpoint-param name="prefs" value="[[_prefs]]"></gr-endpoint-param>
<gr-endpoint-param name="fileType" value="[[_type]]"></gr-endpoint-param>