本文转自: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. javascript首尾反转字符

    var my_str="Welcome to www.sharejs.com" var i=my_str.length; i=i-1; for (var x = i; x > ...

  2. 安卓向服务器发送List数据

    第一步: 首先写一个自定义的JavaBean,以UserInfo.java为例,需要实现对象序列化的接口,因为之后输出流对象需要实现输出可序列化的对象.不这样的话,后续时发送时会报异常 package ...

  3. IBM V7000

    IBM_V7000 http://www.tuicool.com/articles/7vI7ja http://www.ibm.com/support/knowledgecenter/en/ST3FR ...

  4. Web服务器原理及简单实现

    Web系统由客户端(浏览器)和服务器端两部分组成.Web系统架构也被称为B/S架构.最常见的Web服务器有Apache.IIS等,常用的浏览器有IE.Firefox.chrome等.当你想访问一个网页 ...

  5. Xamarin.Android开发实践(十一)

    Xamarin.Android之使用百度地图起始篇 一.前言 如今跨平台开发层出不穷,而对于.NET而言时下最流行的当然还是 Xamarin,不仅仅能够让我们在熟悉的Vs下利用C#开发,在对原生态类库 ...

  6. SAE Java相关问题小结

    转自:http://blog.csdn.net/bhq2010/article/details/8580412 Sae中使用的servlet容器是jetty7.4.x 我想在web.xml中配置一个自 ...

  7. linux shutdown关闭系统命令使用介绍(转)

    shutdown命令是最常用的关闭系统命令,不仅可以用于立即关闭系统,还可以在指定时间关闭系统   linux关闭系统命令之shutdown 关闭.重启系统 Linux是一个多用户.多任务系统,如果不 ...

  8. 小甲鱼PE详解之基址重定位详解(PE详解10)

    今天有一个朋友发短消息问我说“老师,为什么PE的格式要讲的这么这么细,这可不是一般的系哦”.其实之所以将PE结构放在解密系列继基础篇之后讲并且尽可能细致的讲,不是因为小甲鱼没事找事做,主要原因是因为P ...

  9. JAVA,JSP新建默认UTF-8

    要让一个 Java 源文件打开时编码格式为 UTF-8,需要做2件事情:1)设置Java 源文件的默认编码格式为UTF-8:2)设置workspace的编码格式为UTF-8. 相应设置如下: 设置 J ...

  10. Python实践:开篇

    一.概述 Python实践 是应用Python解决实际问题的案例集合,这些案例中的Python应用通常 功能各异.大小不一. 该系列文章是本人应用Python的实践总结,会不定期更新. 二.目录 Py ...