How to use the evt.getImageLocalUrl function in evt

To help you get started, we’ve selected a few evt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leanote / desktop-app / public / plugins / import_evernote / import.js View on Github external
var hashes = attrs.match(/hash="([0-9a-zA-Z]{32})"/);
        var hash = '';
        if (hashes) {
          hash = hashes[1];
        }
        if (!hash) {
          continue;
        }

        var res = parsedRes[hash];
        var fileId = res['FileId'];
        if(!fileId) {
          continue;
        }
        if(res.IsImage) {
          var replace = '<img src="' + Evt.getImageLocalUrl(fileId) + '">';
        } else {
          var replace = '<a href="' + Evt.getAttachLocalUrl(fileId) + '">' + res['Title'] + '</a>'
        }
        content = content.replace(ret[0], replace);
      } catch(e) {
        console.log(e);
      };
    };

    // 如果是, 匹配不到
    content = content.replace(/&lt;\/en-media&gt;/g, '');

    return content;
  },
github leanote / desktop-app / node_modules / file.js View on Github external
me._addImage(Common.objectId(), filePath, function(newImg) {
				callback && callback(Evt.getImageLocalUrl(newImg.FileId));
			});
		});
github leanote / desktop-app / src / node_modules / file.js View on Github external
me._addImage(Common.objectId(), filePath, function(newImg) {
				callback && callback(Evt.getImageLocalUrl(newImg.FileId));
			});
		});
github leanote / desktop-app / node_modules / file.js View on Github external
me._addImage(Common.objectId(), filePath, function(newImg) {
				callback && callback(Evt.getImageLocalUrl(newImg.FileId));
			});
		});