I'm trying to get pasted links to generate absolute URLs. I have read the TinyMCE docs about this, as well as the comments in the issues here and here. I am using TinyMCE 2.1.1.1 (and Firefox 2.0.0.6, in case that's relevant).
I have hacked the tinymce_config() function in tinymce.module to include the following lines:
$init['relative_urls'] = 'false';
$init['document_base_url'] = "http://".$_SERVER['SERVER_NAME'].$host;
$init['remove_script_host'] = "true";
This works perfectly... except in the regrettably common case of any path beginning with 'node'. Any other link I throw at it, regardless of how labarynthine the path, works fine, but where I would want '/node/123', it produces '/123'. This suggests that perhaps somewhere there is still some code comparing the URL of the current document (say '/node/234/edit') with the target of the pasted link, despite the fact that the above configuration should mean TinyMCE only cares about the path relative to the base URL.
I have had the same issue with Moxie and earlier versions of TinyMCE. Any ideas?
Comments
Comment #1
AdrianB commentedNot a solution at all (and probably OT), but I'm using Path Filter successfully with TinyMCE to handle URLs.
Comment #2
Mac Clemmens commentedAny luck isolating the cause? I'm having the same issue. Lots of code to dig through...
Comment #3
nicoloye commented