Implement remember document position

This commit is contained in:
benweet 2013-06-04 00:15:25 +01:00
parent 3108679297
commit 08350f5c80

View File

@ -282,8 +282,10 @@ define([
undoManager = editor.run(previewWrapper); undoManager = editor.run(previewWrapper);
undoManager.reinit(initDocumentContent, fileDesc.editorStart, fileDesc.editorEnd, fileDesc.editorScrollTop); undoManager.reinit(initDocumentContent, fileDesc.editorStart, fileDesc.editorEnd, fileDesc.editorScrollTop);
$("#wmd-input").bind("keydown click focus", function(event) { $("#wmd-input").bind("keydown click focus", function(event) {
if(documentContent !== undefined) {
fileDesc.editorStart = this.selectionStart; fileDesc.editorStart = this.selectionStart;
fileDesc.editorEnd = this.selectionEnd; fileDesc.editorEnd = this.selectionEnd;
}
}); });
// Hide default buttons // Hide default buttons