Jump to content

TinyMCE issue


wmguk

Recommended Posts

Hey,

 

I have a cms system installed using TinyMCE - I have a code:

 

function TinyMCE_Save(editor_id, content, node)
{
	base_url = tinyMCE.settings['document_base_url'];
	var vHTML = content;
	if (true == true){
		vHTML = tinyMCE.regexpReplace(vHTML, 'href\s*=\s*"?'+base_url+'', 'href="', 'gi');
		vHTML = tinyMCE.regexpReplace(vHTML, 'src\s*=\s*"?'+base_url+'', 'src="', 'gi');
		vHTML = tinyMCE.regexpReplace(vHTML, 'mce_real_src\s*=\s*"?', '', 'gi');
		vHTML = tinyMCE.regexpReplace(vHTML, 'mce_real_href\s*=\s*"?', '', 'gi');
	}
	return vHTML;

 

However when I add html to an image link I set the url src as http://www.domain.co.uk/services/images/arch.jpg

but on the html on the page is showing as http://www.domain.co.uk/services/services/images/arch.jpg

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/184523-tinymce-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.