fineui整合kindeditor的例子
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:pageManager runat="server" />
<f:ContentPanel runat="server" Height="300">
<asp:TextBox runat="server" ID="Editor" Width="725px" Height="450px" TextMode="MultiLine"
Style="visibility: hidden;"></asp:TextBox>
</f:ContentPanel>
<f:Button runat="server" ID="btn" Text="取值" OnClientClick="getHtmlValue()" />
</form>
</body>
</html>
<link href="kindeditor/themes/default/default.css" rel="stylesheet">
<link href="kindeditor/plugins/code/prettify.css" rel="stylesheet">
<script src="kindeditor/kindeditor.js" charset="utf-8"></script>
<script src="kindeditor/lang/zh_CN.js" charset="utf-8"></script>
<script src="kindeditor/plugins/code/prettify.js" charset="utf-8"></script>
<script>
var editor;
KindEditor.ready(function (K) {
editor = K.create('#<%=Editor.ClientID%>', {
items: ['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
'anchor', 'link', 'unlink'],
cssPath: 'kindeditor/plugins/code/prettify.css',
uploadJson: 'kindeditor/asp.net/upload_json.ashx',
fileManagerJson: 'kindeditor/asp.net/file_manager_json.ashx',
allowFileManager: true,
});
editor.focus();
prettyPrint();
});
function getHtmlValue() {
// 同步数据后可以直接取得textarea的value,FineUI框架 button提交时先调用
editor.sync();
}
//延时重新创建kindeditor(可能是因为extjs组件由于渲染过程比较慢,而kindeditor可能在指定节点创建之前就进行渲染,导致节点未找到等问题)
Ext.onReady(function () {
editor.remove().create();
});
</script>
后台:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Editor.Text = "kindeditor整合例子";
}
}
protected void btn_OnClick(object sender, EventArgs e)
{
Alert.Show(Editor.Text);
}
fineui整合kindeditor的例子的更多相关文章
- 在DWZ框架中整合kindeditor复文本框控件
今天上午在DWZ框架中整合kindeditor复文本框控件,发现上传图片是老是提示 “上传中,请稍候...”,上网查看别人说可能是文件路径问题,在想以前在其他项目中用这个控件一直没问题,到这里怎么会出 ...
- springboot整合elasticsearch入门例子
springboot整合elasticsearch入门例子 https://blog.csdn.net/tianyaleixiaowu/article/details/72833940 Elastic ...
- spring小例子-springMVC+mybits整合的小例子
这段时间没更博,找房去了... 吐槽一下,自如太坑了...承诺的三年不涨房租,结果今年一看北京房租都在涨也跟着涨了... 而且自如太贵了,租不起了.. 突然有点理解女生找对象要房了.. 搬家太 ...
- FineUI登入的例子中遇到的一些问题
对于在使用FineUI这个例子的时候我们首先就是要在form标签内部添加一个 第一步. <ext:PageManager ID="PageManager1" runat=&q ...
- 简单的整合 shiro + SpringMVC 例子
简单的整合shiro和springmvc的例子 想要整合Shiro和springmvc,在网上找了很多例子,感觉都有一点复杂.所以就自己写了一个最简单整合项目,记录在这里以备后面查看. 这个例子包含如 ...
- Thinkphp5.0整合个推例子
最近做一个后台发送消息推送到app(android和ios)的功能,该功能采用的是个推接口,基于php的,我用TP5来实现这个推送流程.先看官方demo吧.可以先参考官方给到的例子来看http://d ...
- TP3.2整合kindeditor
HTML <!-- KE图片上传 --> <link rel="stylesheet" href="__PUBLIC__/kindeditor/th ...
- Spring Boot 与 Mybatis、Mysql整合使用的例子
第一步: 创建一个SpringBoot的工程,在其中的Maven依赖配置中添加对JDBC.MyBatis.Mysql Driver的依赖具体如下: <!-- JDBC --> <de ...
- kindeditor编辑器代码过滤解决方法.
很多朋友在使用Kindeditor编辑器的时候都会遇到这样一个问题,如:给A标签加上title属性过后,浏览的时候,却神奇般地发现title属性没有了.再次切换html源代码的时候,返现编辑器将tit ...
随机推荐
- Insecure Code Management
Insecure Code Management-------------不安全的代码管理 Get the password (in clear text) from the admin accoun ...
- 分布式session共享
一.前言 为什么会出现session共享问题? 客户端与服务器交互时会产生唯一的sessionid用于标记用户,但是在分布式架构中,如果还是采用 session 的方式,用户发起请求,通过 nginx ...
- 【转】Fiddler常见用法
转载自:https://blog.csdn.net/china_jeffery/article/details/82426586 一.会话过滤器 选中[Filters]–> [Use Filte ...
- nightwatch 基于Webdriver的端到端自动化测试框架
nightwatch 是使用nodejs编写的,基于Webdriver api 的端到端自动化测试框架 包含以下特性 清晰的语法,基于js 以及css 还有xpath 的选择器 内置测试runner, ...
- presto-gateway lyft 团队开源的prestodb 的负载均衡、代理、网关工具
presto-gateway 是 lyft 团队开源 的prestodb 的工具,很方便,我们可以用来方便的管理presto 多集群 通过yaml 进行配置管理,可以方便的管理不同的集群 lyft 参 ...
- charles安装及使用
一.下载安装charles 1.官方网址:https://www.charlesproxy.com/ 选择自己需要的macos/windows/linux下对应的最新版本安装即可 我的是mac,下载版 ...
- pandas批量读取带有日期的文件夹简单操作
工作中碰到了这样一个数据处理的问题,想让你把某个文件夹下的子文件夹中的excel表级联成为1张表,用excel来做会很浪费时间并且很劳累,这时候我们就可以用pandas来加大工作效率,只需要半个小时就 ...
- BDD的概念
BDD的概念Behavior-Driven Development (BDD) is a set of software engineering practices designed to help ...
- R语言 rds文件 和 文本文件 转换
library(data.table) ## 读取 rds 文件,然后保存为文本文件 data <- readRDS("pneumonia_pathogens.rds") w ...
- Mac版最详细的Flutter开发环境搭建
上周任务不多,闲来无事想学习一下flutter耍一耍,发现flutter的环境搭建步骤还是很繁琐的,官网的搭建教程只是按步骤让你进行操作,中间出现的问题完全没有提及,对我这种没搞过原生开发的小白来说超 ...