Open jaylucas opened 8 years ago
So I am having issues setting the content after initialization of the markdown editor.
debugger; // $scope.candidateInfo.notes <--- has a string in it $('#editor').markdownEditor('setContent', $scope.candidateInfo.notes);
I get a :
TypeError: Cannot read property 'env' of undefined
Any idea why? This is the order of execution:
$('#editor').markdownEditor({ preview: true, onPreview: function (content, callback) { callback( marked(content) ); } }); someService.getById($routeParams.id).then( function(response){ $scope.candidateInfo = response.data; debugger; $('#editor').markdownEditor('setContent', $scope.candidateInfo.notes); } );
if it helps it is breaking on this line:
var editor = ace.edit(this.find('.md-editor')[0]);
So I am having issues setting the content after initialization of the markdown editor.
I get a :
Any idea why? This is the order of execution:
if it helps it is breaking on this line: