7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Links created in SimpleTInyMCEField
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 266 Views |
-
Links created in SimpleTInyMCEField

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?
thanks!
Steve -
Re: Links created in SimpleTInyMCEField

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');
| 266 Views | ||
|
Page:
1
|
Go to Top |

