xheditor HTML编辑器,新闻编辑器初始方法,ajax图片批量上传,添加一个8、13、14px字体
来源:互联网 发布:腾讯汽车招聘php 编辑:程序博客网 时间:2024/05/21 02:20
下载一个xheditor-1.1.14 放在web项目Scripts/目录下
将文件夹下xheditor-1.1.14/demos/
的 saveremoteimg.aspx打开 ,
修改 attachDir =“”;为上传图片路径的路径
打开 upload.aspx 页面,一样修改路径
如:
在web页面上初始化 :
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script src="Scripts/xheditor-1.1.14/xheditor-1.1.14-zh-tw.min.js" type="text/javascript"></script>
<script type="text/javascript"> $(pageInit); function pageInit() { $('#content').xheditor({ skin: 'vista', urlType: 'abs', forcePasteText: 'true', upImgUrl: '!{editorRoot}xheditor_plugins/multiupload/multiupload.html?uploadurl={editorRoot}demos/upload.aspx?immediate=1&ext=1(*.jpg;*.jpeg;*.gif;*.png)', upFlashUrl: '!{editorRoot}xheditor_plugins/multiupload/multiupload.html?uploadurl={editorRoot}demos/upload.aspx?immediate=1&ext=1(*.swf)', upMediaUrl: '!{editorRoot}xheditor_plugins/multiupload/multiupload.html?uploadurl={editorRoot}demos/upload.aspx?immediate=1&ext=1(*.wmv;*.avi;*.wma;*.mp3;*.mid)', upLinkUrl: '!{editorRoot}xheditor_plugins/multiupload/multiupload.html?uploadurl={editorRoot}demos/upload.aspx?immediate=1&ext=1(*.zip;*.rar;*.txt;*.html;*.htm;*.jpg;*.jpge;*.gif)', localUrlTest: '/^https?:\/\/[^\/]*?(yxxx\.com)\//i', remoteImgSaveUrl: '../xheditor/saveremoteimg.aspx', upImgExt:"jpg,jpeg,gif,png" }); }</script>
<textarea id="content" name="content" rows="12" cols="80" style="width: 80%" runat="server" ></textarea>
初始化的xheditor 是没有14px这个字体的,此时需要修改xheditor-1.1.14-zh-cn.min.js文件,打开文件查找10px,在其后添加一个14px的一段字符(
{n:'small',s:'8px',t:'\u6781'},{ n: "x-small", s: "10px", t: "\u6781\u5c0f" }, { n: "xx-small", s: "12px", t: "\u7279\u5c0f" },{n:"xxx-small",s:"13px",t:"\u5f88\u5c0f"}, { n: "xxxx-small", s: "14px", t: "\u5fae\u5c0f" }
) 如:
添加字体:隶书( 如要添加其他字体,只需参考
CSS 中文字体的Unicode码 :http://blog.sina.com.cn/s/blog_4990aec60100qluo.html
)- xheditor HTML编辑器,新闻编辑器初始方法,ajax图片批量上传,添加一个8、13、14px字体
- struts2中添加xheditor编辑器,上传图片
- xhEditor在线编辑器学习笔记(1)---用Struts2+ajax实现图片上传
- 百度编辑器上传图片添加水印方法
- xheditor编辑器上传功能实现
- dwz xheditor编辑器文件上传
- dwz xheditor编辑器文件上传
- 编辑器xheditor图片上传配置如何设置的问题
- Laravel5.2中使用xheditor编辑器实现上传图片功能
- xheditor HTML编辑器简单使用
- 可视化HTML编辑器:xhEditor、FCKeditor
- HTML在线编辑器之xhEditor
- ci中添加xhEditor编辑器
- 强烈推荐 xhEditor-HTML在线编辑器,可视化编辑器
- xheditor编辑器
- xheditor编辑器
- 关于kindeditor编辑器批量上传图片不显示添加图片按钮的问题
- xheditor html编辑器非标准submit提交
- usaco 3.3 Home on the Range
- 使用SpringSide 3.1.4.3开发Web项目的全过程(中)
- HTML、XHTML、CSS基础教程学习笔记(Day 1)
- ubuntu12.10 安装tomcat7
- ngixn进程数 什么是nginx进程 是干什么????
- xheditor HTML编辑器,新闻编辑器初始方法,ajax图片批量上传,添加一个8、13、14px字体
- 使用SpringSide 3.1.4.3开发Web项目的全过程(下)
- 排序算法中对堆排序的解析
- 听专家讲玛雅文明和“世界末日”
- jira 4.2 安装 (含破解及添加GreenHopper安装及破解)【转】
- Win32API不规则窗口制作
- 解决“在eclipse中配置Tomcat时,出现Cannot create a server using the selected type的错误”的问题
- openCV无法解析的外部符号-CvSVM、HOGDescriptor
- C函数_fileno了解