开发者

absolute URL with TinyMCE

开发者 https://www.devze.com 2023-01-29 07:17 出处:网络
Everytime i add an image to tinyMCE it converts the image URL to something stupid (rem开发者_高级运维oves the hostname and adds ../ or whatever it needs) , so i won\'t be able to use the image created

Everytime i add an image to tinyMCE it converts the image URL to something stupid (rem开发者_高级运维oves the hostname and adds ../ or whatever it needs) , so i won't be able to use the image created by tinymce in any other level of the site !

can this be fixed somehow ? relative_urls: "false", not working

Thanks


Use this in your javascript initialization:

relative_urls : false,
remove_script_host : false,
convert_urls : true,

Get TinyMCE to use full image url instead of relative one


Before initializing tinymce i set the following variable

var system_url = "http://myserver.com/workspace/codebase/html/";

so that i am able to use system_url later for adressing images and other files like this

content_css: system_url+'js/tiny_mce/css/green.css',
0

精彩评论

暂无评论...
验证码 换一张
取 消