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, biapar, Willr, Ingo, swaiba, simon_w

Links created in SimpleTInyMCEField


Reply

2 Posts   476 Views

Avatar
aragonne

9 March 2012 at 1:32pm Community Member, 26 Posts

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?

thanks!
Steve

Avatar
paradigm

3 August 2012 at 12:22pm Community Member, 5 Posts

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

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