.net百度编辑器的使用
1.前端引用
<%@ Page ValidateRequest="false" Language="C#" AutoEventWireup="true" CodeBehind="ProductsAdd.aspx.cs" Inherits="Maticsoft.Web.Manager.ProductsAdd" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="utf8-net/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="utf8-net/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="utf8-net/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript"> //实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
var ue = UE.getEditor('txtEditorContents');
</script>
<script type="text/javascript">
function previewFile() {
var preview = document.querySelector('img');
var file = document.querySelector('input[type=file]').files[0];
var reader = new FileReader();
reader.onloadend = function () {
preview.src = reader.result;
}
if (file) {
reader.readAsDataURL(file);
} else {
preview.src = "";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="place">
<span>位置:</span>
<ul class="placeul">
<li><a href="#">首页</a></li>
<li><a href="#">表单</a></li>
</ul>
</div>
<div class="formbody">
<div class="formtitle"><span>基本信息</span></div>
<ul class="forminfo">
<li>
<label>商品名</label><input name="txt_name" type="text" class="dfinput" runat="server" id="txt_name" />
</li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="商品名不能为空!" ControlToValidate="txt_name" ForeColor="Red"></asp:RequiredFieldValidator>
<li>
<label>商品分类</label>
<asp:DropDownList ID="DropDownList2" runat="server" Height="29px" Width="193px">
</asp:DropDownList>
</li>
<li>
<label>商品单价</label><input name="txt_name" type="text" class="dfinput" runat="server" id="Text2" /> </li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="价格不能为空!" ControlToValidate="Text2" ForeColor="Red"></asp:RequiredFieldValidator> <li>
<label>批发价</label><input name="txt_name" type="text" class="dfinput" runat="server" id="Text3" />
</li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="价格不能为空!" ControlToValidate="Text3" ForeColor="Red"></asp:RequiredFieldValidator>
<li>
<label>单位</label><input name="txt_name" type="text" class="dfinput" runat="server" id="Text1" />
</li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="单位不能为空!" ControlToValidate="Text1" ForeColor="Red"></asp:RequiredFieldValidator>
<%-- <li>
<label>商品介绍</label><textarea name="txta" style="width: 499px; height: 41px" id="Textarea4" runat="server"></textarea>
</li>--%>
<%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="商品介绍不能为空!" ControlToValidate="Textarea4"></asp:RequiredFieldValidator>--%>
<li>
<label>商品图片</label><asp:FileUpload ID="FileUpload" runat="server" onchange="previewFile()" />
<asp:Image ID="preview" runat="server" Height="42px" Width="46px" />
</li>
<li>
<label>备注</label><textarea name="txta1" style="width: 479px; height: 41px" id="Textarea1" runat="server"></textarea>
</li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="备注不能为空!" ControlToValidate="Textarea1" ForeColor="Red"></asp:RequiredFieldValidator>
<li>
<label>销量</label>
<asp:TextBox ID="TextBox1" runat="server" CssClass="dfinput"></asp:TextBox>
</li>
<li>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="销量不能为空!" ControlToValidate="TextBox1" ForeColor="Red"></asp:RequiredFieldValidator>
</li>
<li>
<label>是否热门</label>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="1">热销</asp:ListItem>
<asp:ListItem Value="0">不热销</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>推荐</label>
<asp:DropDownList ID="DropDownList3" runat="server">
<asp:ListItem Value="1">推荐</asp:ListItem>
<asp:ListItem Value="0">不推荐</asp:ListItem>
</asp:DropDownList>
</li> <li>
<label>新品</label>
<asp:DropDownList ID="DropDownList4" runat="server">
<asp:ListItem Value="1">新品</asp:ListItem>
<asp:ListItem Value="0">不是新品</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>优惠</label>
<asp:DropDownList ID="DropDownList5" runat="server">
<asp:ListItem Value="1">优惠</asp:ListItem>
<asp:ListItem Value="0">不优惠</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>轮播图</label>
<asp:DropDownList ID="DropDownList6" runat="server">
<asp:ListItem Value="1">宣传</asp:ListItem>
<asp:ListItem Value="0">不宣传</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>是否下架</label>
<asp:DropDownList ID="DropDownList7" runat="server">
<asp:ListItem Value="0">否</asp:ListItem>
<asp:ListItem Value="1">是</asp:ListItem>
</asp:DropDownList>
</li>
<li>
<label>颜色</label>
<asp:TextBox ID="TextBox2" runat="server" CssClass="dfinput" placeholder="颜色要以逗号分隔开比如:黄,红" Height="28px" Width="378px"></asp:TextBox>
</li>
<li>
<asp:TextBox ID="txtEditorContents" name="txtEditorContents" runat="server" TextMode="MultiLine" Height="200px" Width="1000px" ClientIDMode="Static "> </asp:TextBox><asp:Button ID="btn_add" runat="server" Text="确认添加" CssClass="btn" OnClick="btn_add_Click" Height="39px" Width="121px" OnClientClick="getcked()" />
</li> </ul> </div>
</form>
</body>
</html>
2.后台赋值
model.P_text = txtEditorContents.Text;
下载地址:链接:https://pan.baidu.com/s/1pJmEsR2LUJCljkNBuqabpA 密码:0r18
.net百度编辑器的使用的更多相关文章
- 一步步开发自己的博客 .NET版(4、文章发布功能)百度编辑器
前言 这次开发的博客主要功能或特点: 第一:可以兼容各终端,特别是手机端. 第二:到时会用到大量html5,炫啊. 第三:导入博客园的精华文章,并做分类.(不要封我) 第四:做个插件,任何网站上的技术 ...
- 关于百度编辑器UEditor的一点说明
大家在使用的时候要特别注意editor_config.js中的“URL”这个参数 我的理解:1.这个参数是editor整个结构的总路径 2.首先要把这个路径配置好了.才能正常的显示, ...
- 百度编辑器ueditor插入表格没有边框颜色的解决方法
附:从word excel 中 复制的表格提交后无边框,参考这个同学的,写的很详细: http://blog.csdn.net/lovelyelfpop/article/details/51678 ...
- 百度编辑器UEditor的使用方法
百度编辑器具有丰富文本编辑功能,且开源免费,其使用方法如下: 1.在官网上下载对应的Uditor压缩包:http://ueditor.baidu.com/website/download.html 2 ...
- 百度编辑器ueditor插入表格没有边框,没有颜色的解决方法 2015-01-06 09:24 98人阅读 评论(0) 收藏
百度富文本编辑器..很强大.. - - ,不过有些BUG..真的很无解.. 最近用这个,发现上传的表格全部没有表框.. 解决办法如下: 转载的.. 百度编辑器ueditor插入一个表格后,在编辑过程中 ...
- UEditor百度编辑器,工具栏上自定义添加一个普通按钮
添加一个名叫“hougelou”的普通按钮在工具栏上: 第一步:找到ueditor.config.js文件中的toolbars数组,增加一个“hougelou”字符串,然后找到labelMap数组,对 ...
- 百度编辑器 ueditor 内容编辑自动套P标签,及p标签 替换
如图,红框为回车键和shift+回车 : ===>> ueditor.all.js中: 1: 搜索修改成false:allowDivTransToP: false 再搜索并修改以下 ...
- 百度编辑器ueditor 异步加载时,初始化没办法赋值bug解决方法
百度编辑器ueditor 异步加载时,初始化没办法赋值bug解决方法 金刚 前端 ueditor 初始化 因项目中使用了百度编辑器——ueditor.整体来说性能还不错. 发现问题 我在做一个编辑页面 ...
- yii2解决百度编辑器umeditor图片上传问题
作者:白狼 出处:http://www.manks.top/article/yii2_umeditor_upload本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原 ...
- yii2整合百度编辑器umeditor
作者:白狼 出处:www.manks.top/article/yii2_umeditor 本文版权归作者,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责 ...
随机推荐
- pyspark数据准备
鸢尾花数据集 5.1,3.5,1.4,0.2,Iris-setosa 4.9,3.0,1.4,0.2,Iris-setosa 4.7,3.2,1.3,0.2,Iris-setosa 4.6,3.1,1 ...
- 3、eclipse集成svn
手动安装 1.从官网下载适合自己开发工具的site-.zip文件,网址是:subclipse.tigris.org,2.从中解压出features与plugins文件夹,复制到eclipse的目录my ...
- WCF入门教程(二)从零做起-创建WCF服务
通过最基本的操作看到最简单的WCF如何实现的.这是VS的SDK默认创建的样本 1.创建WCF服务库 2.看其生成结构 1)IService1.cs(协议) 定义了协议,具体什么操作,操作的参数和返回值 ...
- ulimit设置内存限制是否有效
如何使用ulimit限制物理内存 限制物理内存 $ ulimit -m 512000 经测试,无效. 限制物理内存不起作用,ulimit不支持限制物理内存,可见man ulimit手册 -m The ...
- mybatis异常:Caused by: java.lang.IllegalArgumentException: Result Maps collection already contains value for。。。。。。
框架环境:ssm 昨天下午技术经理更新了下表结构,多加了一个字段. 之后我根据新的mapper.xml文件写了增删改查的操作.重新启动之后不是这个错就是那个错,一大堆错误,头疼. 像类似于NoSuch ...
- php 异步执行脚本
这里说的异步执行是让php脚本在后台挂起一个执行具体操作的脚本,主脚本退出后,挂起的脚本还能继续执行.比如执行某些耗时操作或可以并行执行的操作,可以采用php异步执行的方式.主脚本和子脚本的通讯可以采 ...
- 代码编辑器之EditPlus
引用及下载地址:http://www.iplaysoft.com/editplus.html EditPlus是一套功能非常强大的文字编辑器,拥有无限制的Undo/Redo(撤销).英文拼字检查.自动 ...
- 黄聪:php精度计算问题
如果用php的+-*/计算浮点数的时候,可能会遇到一些计算结果错误的问题,比如echo intval( 0.58*100 );会打印57,而不是58,这个其实是计算机底层二进制无法精确表示浮点数的一个 ...
- pytest.4.Fixture
From: http://www.testclass.net/pytest/fixture/ 我们可以简单的把Fixture理解为准备测试数据和初始化测试对象的阶段. 一般我们对测试数据和测试对象的管 ...
- pytest.3.Assert
From: http://www.testclass.net/pytest/assert/ Assert就是断言,每个测试用例都需要断言. 与unittest不同,pytest使用的是python自带 ...