public bool pasteImageFromClipboard() { if (Clipboard.ContainsImage()) { "Image in Clipboard".debug(); O2Thread.mtaThread( () => { var tempImageTag = "[[Uploading_Image_tmp{0}]]".format(5.randomNumbers()); WikiTextEditor.insertText(tempImageTag); var imageUrl = WikiApi.uploadImage_FromClipboard(); var wikiTextForImage = WikiApi.getWikiTextForImage(imageUrl); WikiTextEditor.replaceText(tempImageTag, wikiTextForImage); }); return(true); } return(false); }