在我的web应用程序上,我使用FCKEditor编辑新闻。FCKEditor正在使用KCFinder在服务器上浏览文件或图像。
在config.php (FCKEditor->connector->browser)中,我配置了UserFilesPath和UserFilesAbsolutePath。UserFilesPath包含完整的http://www.domain.tld/images/files/路径,UserFilesAbsolutePath包含相同的路径,但使用的是文档根目录而不是tld。
但是当我转到FCKEditor窗口并尝试添加文本链接时,首先打开对话框,然后我单击浏览器服务器,当我双击一个文件时,我会返回到具有如下路径的对话框:/images/files/xyz.pdf (例如)。
实际上,我需要这样的路径:http://www.domain.tld/images/files/xyz.pdf
请查看场景并提供一些解决方案。
发布于 2014-10-09 20:00:16
StartupPath是CKFinder对象的属性。有关详细信息,请参阅documentation。
CKFinder包中包含了一个可用的示例,它展示了如何使用StartupPath:"_samples/js/popups.html“。
当使用SetupFCKeditor方法将CKFinder附加到FCKeditor时,可以以类似的方式使用StartupPath。
在javascript中,您还可以使用以下语法:
CKFinder.SetupFCKeditor( oFCKeditor, { BasePath : '/ckfinder/', StartupPath :
'Images:/path/to/directory/' } ) ;因此,要获得在CKFinder与FCKeditor集成时设置StartupPath的完整工作示例,只需执行以下步骤:
在下面一行代码中打开_samples/js/fckeditor.html
(add double slash - "//"): //CKFinder.SetupFCKeditor( oFCKeditor, '../../' );
CKFinder.SetupFCKeditor( oFCKeditor, { BasePath : '../../', StartupPath : 'Images:/directory/' } ) ;,其中"Images:/directory/"是一个有效的启动路径,它应该可以工作。https://stackoverflow.com/questions/26277571
复制相似问题