Ruby on Rails - FCKEditor绝对图像路径Ruby

时间:2009-05-01 19:13:43

标签: ruby-on-rails fckeditor

我正在使用FCKEditor wysiwyg编辑器,并且想知道在编辑器中添加图像后是否有人想出如何使用绝对路径而不是相对路径? 如果是这样,怎么做。

1 个答案:

答案 0 :(得分:1)

fckeditor\editor\filemanager\browser\default\connectors\php\basexml.php中搜索此代码:

echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="' . ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;

替换为:

echo '<CurrentFolder path="' . ConvertToXmlAttribute( $currentFolder ) . '" url="'.'http://www.YOURDOMAINHERE.com' .ConvertToXmlAttribute( GetUrlFromPath( $resourceType, $currentFolder ) ) . '" />' ;