This example shows you how to setup TinyMCE to produce different results for it's URLs in images and links. You can read more about these config options in the TinyMCE FAQ

TinyMCE with absolute URLs and including domain on links and images

TinyMCE with relative URLs on links and images

TinyMCE with relative URLs on links and images to a specific page

TinyMCE with no url convertion