本文转自: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. 更改Apache默认网站根目录

    Apache服务器网站根目录配置是个比较基本的操作,之前经常用,现在记一下笔记 打开Apache的配置文件,一般在Apache安装目录下的conf/httpd.conf配置文件中修改, 找到 Docu ...

  2. Java for LeetCode 044 Wildcard Matching

    Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. ...

  3. java文件上传路径缺少\的解决办法

    今天做一个文件上传,取路径,然后读取文件的时候,发现存储到MySQL的路径是这样的:

  4. Python Elasticsearch api

    描述:ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.下面介绍了利用Python API接口进行数据查询,方便 ...

  5. SQLHelper、DBUtil终极封装

    DBUtil.java package org.guangsoft.util; import java.io.InputStream; import java.sql.Connection; impo ...

  6. Android主题换肤实现

    本系列文章主要是对一个Material Design的APP的深度解析,主要包括以下内容 基于Material Design Support Library作为项目整体框架.对应博文:Android ...

  7. 【转】Quartus II调用modelsim无缝仿真

    Quartus II调用modelsim无缝仿真  ★emouse 思·睿博客文章★ 原创文章转载请注明:http://emouse.cnblogs.com 本篇文章为转载,写的不错,最近在学mode ...

  8. context switches per second 上下文切换

    上下文切换对系统来说意味着消耗大量的CPU时间.上下文切换只发生在内核态中.内核态是CPU的一种有特权的模式,在这种模式下只有内核运行并且可以访问所有内存和其它系统资源.

  9. Java中比较不同的MD5计算方式

    在项目中经常需要使用计算文件的md5,用作一些用途,md5计算算法,通常在网络上查询时,一般给的算法是读取整个文件的字节流,然后计算文件的md5,这种方式当文件较大,且有很大并发量时,则可能导致内存打 ...

  10. hdu 4576 概率dp **

    题意:Michael has a telecontrol robot. One day he put the robot on a loop with n cells. The cells are n ...