wordpress-mobile / WordPress-Editor-iOS

⛔️ [DEPRECATED] A reusable iOS rich text editor component.
GNU General Public License v2.0
1.06k stars 210 forks source link

replaceLocalImageWithRemoteImage doesn't work #792

Closed michaelmou closed 8 years ago

michaelmou commented 8 years ago

thanks your code , and i have some questions, which moment can I use the method "replaceLocalImageWithRemoteImage"?? I used it after it was a local image, and i have no mediaId, after invoked the method, nothing was happen.what's wrong?? how can i get the mediaId, does it important to this method??

michaelmou commented 8 years ago

And I try removeImage else, it doesn't work neither.

SergioEstevao commented 8 years ago

The purpose of that method is to insert a local image while an upload is happening to the server, and when the upload is finished and you have the final url of the image to replace the local url for the remote url. The media ID is important because is how the code finds the local image to replace it. You can generate any random ID and associate it with that particular image.

If you just want to insert an image that already is on a server you can use the "insertImage" method.

GioValentin commented 8 years ago

what is the point of having a uniqueID and a mediaID. are they the same thing?