When I enter a relative url TinyMCE converts it to an absolute one.
How can I disable this?
I know that there is a configuration setting for tinyMCE_init called relative_urls=false.
But where do I change this setting?

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Are you sure you have the latest development snapshot installed? That should contain and use the configuration option "convert_urls" = FALSE, which means that the editor won't convert any URLs at all.

tomsm’s picture

Yes, the one of 21 April 2009: Wysiwyg API 6.x-2.x-dev (2009-Apr-21)
How can I check this configuration option?

tomsm’s picture

When I enter "/drupal/en/node/123", the URL is changed to "http://localhost/en/node/123" when I save the node.
When I disable the rich text editor, the URL is not changed after saving.

lhugg’s picture

There is an option called 'convert_urls'=>FALSE in a file called tinymce.inc that is located in /sites/all/modules/wysiwyg/editors. Haven't tested it, but I assume that's what it does.

tomsm’s picture

Yes, I have found this option:
// TinyMCE's URL conversion magic breaks Drupal modules that use a special
// syntax for paths. This makes 'relative_urls' obsolete.
'convert_urls' => FALSE,

So url conversion should not happen, but is does happen. Is there another setting in Drupal that may cause this?

There also exists an relative_urls, but this is not present in tinymce.inc. Coul this help?
Or the option 'document_base_url' => base_path()? Can this help?

sun’s picture

I don't know, please let us know if you find out.

sun’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Sorry, I'm unable to replicate this issue in the latest official release.

Feel free to re-open this issue if you want to provide further information. Thanks.

tomsm’s picture

I have updated all modules and the problem has disappeared. Do not know what caused it.
Thank you for your help!