Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Links created in SimpleTInyMCEField

Go to End

2 Posts   1020 Views


Community Member, 26 Posts

9 March 2012 at 1:32pm

Hi there,

When using the link editor (ie, the button with the chain link icon) in a SimpleTinyMCEField with the DataObjectManager, I discovered that SimpleTinyMCEField rewrites all root relative links to be page relative to the location of the SimpleTinyMCE source code. For example, if I enter the url /glossary/abscess and click Save, the link is converted to ../../../../../glossary/abscess.

I poked around the source code and found that in DataObjectManager's code/simple_tinymce_field/javascript/tiny_mce/tiny_mce_src.js file, there are two settings: convert_urls and relative_urls. Both are set to 1. If I set them both to zero, SimpleTinyMCEField no longer rewrites the link(s), which is what I wanted.

My question is, is there a better way to update these two settings, for example in _config.php, so I wouldn't have to touch the core Javascript?



Community Member, 5 Posts

3 August 2012 at 12:22pm

To answer your question, add the following line anywhere in your _config.php;

SimpleTinyMCEField::set_default_extra_options('convert_urls: 0, relative_urls: 0');