本文转自: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. 猪八戒吃西瓜(wmelon)-排序-查找

    问题 A: 猪八戒吃西瓜(wmelon) 时间限制: 1 Sec  内存限制: 64 MB提交: 30  解决: 14[提交][状态][讨论版] 题目描述 有一天,贪吃的猪八戒来到了一个大果园,果园里 ...

  2. 岛屿(洛谷 U5399)

    题目背景 放假了,Lkw和mm到岛上旅游.阳光明媚,风景秀丽.正当Lkw和mm享受眼前这旖旎的风光时,突降大雨,小岛上开始积水,没过几分钟,水便快要触及膝盖.Lkw和mm意识到了事态的严重性,赶紧向高 ...

  3. JUC系列回顾之-CountDownLatch底层原理和示例

    CountDownLatch 是一个同步工具类,允许一个线程或者多个线程等待其他线程完成操作,再执行. CountDownLatch(int count) 构造一个用给定计数初始化的 CountDow ...

  4. Java Hour 59 JVM Heap

    程序没有方法区释放一段Heap 上的内存,只有JVM 本身可以去回收内存,这个工作单位就是GC. Garbage Collection GC 用来清理对象,同时也用来移动对象减少内存碎片. JVM 指 ...

  5. phpcms筛选功能

    phpcms论坛的看到的-----做筛选功能-----自定义函数 <?php /** * extention.func.php 用户自定义函数库 * * @copyright (C) 2005- ...

  6. JSON详解(转)

    JSON详解 JSON的全称是”JavaScript Object Notation”,意思是JavaScript对象表示法,它是一种基于文本,独立于语言的轻量级数据交换格式.XML也是一种数据交换格 ...

  7. loj 1308(点双连通分量应用)

    题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=27016 题意:求一个连通图去掉任意一个点以及与它相连的边,图中的所 ...

  8. 【HTML5】拖放(Drag 和 drop)

    效果图: <!DOCTYPE HTML> <html> <head> <style type="text/css"> #div1 { ...

  9. android知识体系

    1.Android架构分为4层*应用程序层 Android会同一系列核心应用程序包一起发布,该应用程序包包括email客户端,SMS短消息程序,日历,地图,浏览器,联系人管理程序等.所有的应用程序都是 ...

  10. 向table添加水平滚动条

    转自:http://www.cnblogs.com/linjiqin/p/3148225.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4. ...