本文转自: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. 【动态规划】skiing_深度搜索_动态规划

    问题 B: [动态规划]skiing 时间限制: 1 Sec  内存限制: 128 MB提交: 28  解决: 11[提交][状态][讨论版] 题目描述 Michael喜欢滑雪百这并不奇怪, 因为滑雪 ...

  2. JavaScript设计模式 - 单例模式

    单例模式:保证一个类仅有一个实例,并提供一个访问它的全局访问点. 一.实现一个标准的单例模式,用一个变量来标志当前是否已经为某个类创建过对象, 如果是,则在下一次获取该对象实例时,直接返回之前创建的对 ...

  3. 搭建Maven工程的时候,做单元测试,报ClassNotFoundException

    搭建Maven工程的时候报错 问题原因是在spring.xml中配置的  classpath:config.properties  没有在工程中创建.

  4. eclipse静态部署tomcat

  5. Android 判断app是否在前台运行

    <!-- 前台还是后台 --> <uses-permission android:name="android.permission.GET_TASKS" /> ...

  6. .net学习笔记----二级域名站点共享Session状态

    前面一篇文章提到了如何在使用了ASP.NET form authentication的二级站点之间共享登陆状态, http://www.cnblogs.com/jzywh/archive/2007/0 ...

  7. 标准C实现基于TCP/IP协议的文件传输

    上学期集成程序设计的课堂作业,对于理解TCP/IP实现还是挺有帮助的. TCP/IP编程实现远程文件传输在LUNIX中一般都采用套接字(socket)系统调用. 采用客户/服务器模式,其程序编写步骤如 ...

  8. 《Java程序性能优化》学习笔记 设计优化

    豆瓣读书:http://book.douban.com/subject/19969386/ 第一章 Java性能调优概述 1.性能的参考指标 执行时间: CPU时间: 内存分配: 磁盘吞吐量: 网络吞 ...

  9. 《MySQL必知必会》笔记 事务、安全及性能等

    二十六 管理事务处理 1.并非所有引擎都支持事务处理,如MyIASM和InnoDB,关于事务处理的几个术语:事务(Transaction)指一组sql语句:回退(rollback)指撤销指定SQL语句 ...

  10. WPF中的画图

    1.border(边框):      <Border BorderBrush="Blue" BorderThickness="0,1,1,1" Grid. ...