Example 13 - URL conversion


Configuration that goes into the script tag.

tinyMCE.init({
	mode : "exact",
	elements : 'absurls',
	theme : "advanced",
	plugins : 'advlink,advimage',
	relative_urls : false
});

tinyMCE.init({
	mode : "exact",
	elements : 'abshosturls',
	theme : "advanced",
	plugins : 'advlink,advimage',
	relative_urls : false,
	remove_script_host : false
});

tinyMCE.init({
	mode : "exact",
	elements : 'relurls',
	theme : "advanced",
	plugins : 'advlink,advimage',
	relative_urls : true // Default value
});

tinyMCE.init({
	mode : "exact",
	elements : 'relurlstopage',
	theme : "advanced",
	plugins : 'advlink,advimage',
	relative_urls : true, // Default value
	document_base_url : 'http://wiki.moxiecode.com/examples/'
});

tinyMCE.init({
	mode : "exact",
	elements : 'nourlconvert',
	theme : "advanced",
	plugins : 'advlink,advimage',
	convert_urls : false
});

And the result. View the source of this page to see how the HTML looks.

TinyMCE with absolute URLs on links and images


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


Back to TinyMCE Wiki