本文转自:https://www.obout.com/editor_new/KnowledgeBase.aspx?id=706

 
Absolute path for uploaded image

Q: 

I use the code of 'cs_Custom_ImageUpload_popup.aspx' file from the Suite for images uploading.
This code uploads images and inserts them into content.
Each new inserted image has relative path like here:
<img src="/newsletterImages/View.jpg" ... /> Is there an easy way to make an absolute path like here?
<img src="http://www.domainname.co.za/newsletterImages/View.jpg" ... /> A: Open for editing the ASPX file that contains the JavaScript code for images uploading (like in 'cs_Custom_ImageUpload_popup.aspx'). Find the following lines: else // Cancel clicked or emulated
{
if(imageFileName != null)
{
editor.focusEditor();
editor.InsertHTML("<img src=\""+imageFileName+"\" alt=\""+imageFileTitle+"\" title=\""+imageFileTitle+"\" />");
}
} Edit them: else // Cancel clicked or emulated
{
if(imageFileName != null)
{
editor.focusEditor();
var img = new Image();
img.src = imageFileName;
editor.InsertHTML("<img src=\""+img.src+"\" alt=\""+imageFileTitle+"\" title=\""+imageFileTitle+"\" />");
}
} Save the file.

obout editor Absolute path for uploaded image的更多相关文章

  1. go: GOPATH entry is relative; must be absolute path: "".

    安装:vscode-go出现以下提示: go: GOPATH entry is relative; must be absolute path: "".Run 'go help g ...

  2. jenkins中配置svn 出现absolute path is not allowed

    代码: 兵马未动,粮草先行 作者: 传说中的汽水枪 如有错误,请留言指正,欢迎一起探讨. 转载请注明出处. 想用jenkins作自动化部署tomcat. svn代码已经checkout到本地目录了(/ ...

  3. learning shell get script absolute path (3)

    Shell get script absolute path [Purpose]        Get shell script absolute path   [Eevironment]       ...

  4. c# Relative Path convert to Absolute Path

    Reference: http://stackoverflow.com/questions/4796254/relative-path-to-absolute-path-in-c http://sta ...

  5. DownLoadManager[20530:228829] DiskImageCache: Could not resolve the absolute path of the old directory.

    uiwebview 模拟器打开PDF文件时崩溃.报下面错误,还不知道为什么 DownLoadManager[20530:228829] DiskImageCache: Could not resolv ...

  6. linux command line learn - get the absolute path of a file

    get the absolute path of a file in linux readlink -f filenme [heshuai@login01 3_Variation_calling]$ ...

  7. Error: setup script specifies an absolute path

    在安装sklearn的时候,出现: error: Error: setup script specifies an absolute path: /opt/xgboost-0.47/python-pa ...

  8. [LeetCode] Longest Absolute File Path 最长的绝对文件路径

    Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsub ...

  9. Longest Absolute File Path

    Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsub ...

随机推荐

  1. redis 初探

    2014年6月24日 17:50:57 解压redis后进入源码目录,只用执行make命令就可以完成安装了 安装完成后到src目录里,将 redis-server redis-cli redis.co ...

  2. Android实现电子邮箱客户端

    本文主要讲述了安卓平台上利用QQ邮箱SMTP协议,POP3协议发送与接收消息的实现 发送邮件核心代码 import java.security.Security; import java.util.D ...

  3. IoC容器Autofac - Autofac + Asp.net MVC + EF Code First(转载)

    转载地址:http://www.cnblogs.com/JustRun1983/archive/2013/03/28/2981645.html  有修改 Autofac通过Controller默认构造 ...

  4. UML中的图的出现顺序

    上接:UML从需求到设计--用例 从开始接触UML到现在对UML逐渐有了更深入的了解.刚开始,对于UML总是感觉UML就是图.一提起UML 就想着这个是画图的东西. 具体这些图都是干什么的.为什么会有 ...

  5. Chromium Embedded Framework 中文文档(简介)

    转自:http://www.cnblogs.com/think/archive/2011/10/06/CEF-Introduce.html 简介 Chromium Embedded Framework ...

  6. Oracle11完全卸载方法 deinstall.bat如何用以及如何删除oracle注册表

    转自:http://blog.sina.com.cn/s/blog_68fe7e15010100an.html 之前因为不知道偶电脑是因为安装了oracle后,才导致的长达两周的开机速度要足足10分钟 ...

  7. sina sae 部署 java ssh 项目

    转自:http://jacobcookie.iteye.com/blog/1876798 1. 在sae上使用struts,需要添加的Listener,在com.company.listener中添加 ...

  8. 简单修改hosts文件加快打开网页速度

    这个电脑小技巧的帖子菲菲博客分享如何通过简单一招利用修改系统的hosts文件来实现有效加快浏览器打开网页的速度.尤其是网络繁忙时DNS服务器负担加重的时候效果特别明显,有兴趣就和菲菲一起来学习一下吧, ...

  9. 【转】HADOOP HDFS BALANCER介绍及经验总结

    转自:http://www.aboutyun.com/thread-7354-1-1.html 集群平衡介绍 Hadoop的HDFS集群非常容易出现机器与机器之间磁盘利用率不平衡的情况,比如集群中添加 ...

  10. SU unif2命令学习