Open AntonioStipic opened 7 years ago
Can you share a example in https://jsfiddle.net/?
I get this error any time we init an instance of ace-editor. It doesn't seem to cause problems for our users but it is an error. Seems to happen on this function's match.
this.$detectNewLine = function(e) { var t = e.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = t ? t[1] : "\n", this._signal("changeNewLineMode") }
Here's an example of how we init:
<div class="form-control" style="height: 400px;" ace-editor="{ mode: 'json', onLoad: aceLoaded, require: ['ace/ext/language_tools'], advanced: { enableSnippets: true, enableBasicAutocompletion: true, enableLiveAutocompletion: true }}" ng-model="data"> </div>
A bit old, but my guess is that data
isn't initialize when the editor is loaded.
I installed ace-angular with npm and created ace editor inside angular, it looks like this:
And it keeps saying "TypeError: Cannot read property 'match' of undefined" every time I load page with ace editor. Screenshot: http://imgur.com/jFsG1KP
It seems that error will not appear if I remove "ace.angular" so I guess it is problem with module?