How to set Responsive Filemanager to return absolute url in TinyMCE

7.9k views Asked by At

Im using Responsive Filemanager v9.3 with TinyMCE

I need to absolute url for inserting image url or any files. But it return relative path.

I need to set image src like <img src="http://domain.com/files/slide.jpg"> but it return <img src="../files/slide.jpg">

My Config:

$base_url= 'http://domain.com';
$upload_dir = '/files/';
$current_path = '../../files/';
$thumbs_base_path = '../thumbs/';
2

There are 2 answers

1
Hamidreza On BEST ANSWER

Just add following code to TinyMCE init.

        tinymce.init({
            relative_urls: false
        });
0
RdeV On

If you want the complete absolute path (http://www/example.com/source/image.png) but the base_url is missing (/source/image.png) you can include it by using:

tinymce.init({
    relative_urls: false,
    remove_script_host : false
});