diff --git a/examples/N1-Composer-Templates/lib/template-editor.coffee b/examples/N1-Composer-Templates/lib/template-editor.coffee index 80adcd9ba..905a7d26c 100644 --- a/examples/N1-Composer-Templates/lib/template-editor.coffee +++ b/examples/N1-Composer-Templates/lib/template-editor.coffee @@ -3,7 +3,7 @@ class TemplateEditor extends ContenteditableExtension - @onContentChanged: (editor) -> + @onContentChanged: ({editor}) -> # Run through and remove all code nodes that are invalid codeNodes = editor.rootNode.querySelectorAll("code.var.empty") @@ -39,7 +39,7 @@ class TemplateEditor extends ContenteditableExtension editor.restoreSelectionByTextIndex(codeNode, selIndex.startIndex, selIndex.endIndex) - @onKeyDown: (editor) -> + @onKeyDown: ({editor}) -> # Look for all existing code tags that we may have added before, # and remove any that now have invalid content (don't start with {{ and # end with }} as well as any that wrap the current selection