最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to set Responsive Filemanager to return absolute url in TinyMCE - Stack Overflow

programmeradmin6浏览0评论

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=".jpg"> but it return <img src="../files/slide.jpg">

My Config:

$base_url= '';
$upload_dir = '/files/';
$current_path = '../../files/';
$thumbs_base_path = '../thumbs/';

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./files/slide.jpg"> but it return <img src="../files/slide.jpg">

My Config:

$base_url= 'http://domain.';
$upload_dir = '/files/';
$current_path = '../../files/';
$thumbs_base_path = '../thumbs/';
Share Improve this question edited Apr 12, 2016 at 11:05 Ynhockey 3,9325 gold badges36 silver badges54 bronze badges asked Jul 26, 2014 at 16:06 HamidrezaHamidreza 1,9154 gold badges29 silver badges43 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 9

Just add following code to TinyMCE init.

        tinymce.init({
            relative_urls: false
        });

If you want the plete absolute path (http://www/example./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
});
发布评论

评论列表(0)

  1. 暂无评论