markdown edtior 问题 图片上传 [ok] tab切换到内容编辑 [ok]

This commit is contained in:
life
2015-03-01 21:46:21 +08:00
parent 2b4b9b3114
commit 120ab4e439
5 changed files with 22 additions and 49 deletions

View File

@@ -1387,11 +1387,12 @@ function initUploadImage() {
FileService.uploadImage(imagePath, function(newImage, msg) {
if(newImage) {
var note = Note.getCurNote();
var url = EvtService.getImageLocalUrl(newImage.FileId);
if(!note.IsMarkdown) {
var url = EvtService.getImageLocalUrl(newImage.FileId);
tinymce.activeEditor.insertContent('<img src="' + url + '">');
} else {
// TODO markdown insert Image
MD.insertLink(url, '', true);
}
} else {
alert(msg || "error");