最近在使用KindEditor,其中遇到三个问题:

1、textarea添加 runat="server" 后整个editor在运行的时候不能显示出来,我没找到原因,于是我就把runat去掉,runat去掉后就面临一个问题如何把数据库中读取出来的值赋给textarea

了,想过很多方法,但是最简单的解决方案就是在后台CS页面直接添加一个Public String contents;使其在前台页面直接用Response.write写出来。详细请见图

问题截图:

 <textarea name="content" id="txtContent" style="width: 700px; height: 600px; visibility: hidden;"  rows="8" cols="100"   runat="server">

解决方法截图:

 <textarea name="content" id="txtContent" style="width: 700px; height: 600px; visibility: hidden;"
rows="8" cols="100" runat="server"><%Response.Write(contents); %></textarea>

2、接着就出现第二个问题,我又怎么把textarea的值取出来呢?也是在网上查的,详情见图:其中content为textarea的name

String txtContent=Request.Form["content"].toString();

3、使用kindeditor无法上传本地图片,我按照它给的例子写的,但是总是报错,其实就是路径设置错误,解决方法:

  <script type="text/javascript">
var editor;
KindEditor.ready(function (K) {
editor = K.create('textarea[name="content"]', {
id: 'txtContent',
allowFileManager: true,
cssPath: '../kindeditor/plugins/code/prettify.css',
uploadJson:'../kindeditor/asp.net/upload_json.ashx',
fileManagerJson:
'../kindeditor/asp.net/file_manager_json.ashx',
afterBlur: function () { this.sync(); }
});
});
</script>

这样配置就可以了加上/kindeditor

如果有更好的解决方法,希望大家提供,我用的方法只是能解决我遇到的问题。

KindEditor Asp.net的更多相关文章

  1. kindeditor asp.net 模板问题 clientidmode="Static"

    1.为了防止asp.net 修改 id, 必须加上clientidmode="Static"   . 2.关于 kindeditor 的脚本,写在master里面,如下(我要骂人了 ...

  2. ASP.NET 配置KindEditor文本编辑器

    ASP.NET 配置KindEditor文本编辑器 跟着这篇博客做了两个小时,只搞出了下面这么个东西. 时间浪费在了原博客里这样的一句话:将kindeditor/asp.net/bin/LitJSON ...

  3. 在MVC3或asp.net中修改KindEditor实现上传图片时添加水印

    主要修改两个文件:image.js和upload_json.ashx文件. 一.修改image.js文件 打开kindeditor/plugins/image目录下的image.js文件,找到 '&l ...

  4. ASP.NET配置KindEditor文本编辑器-图文实例

    1.什么是KindEditor KindEditor 是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果,开发人员可以用 KindEditor 把传统的多行文本输入框(tex ...

  5. asp.net中kindeditor配置

    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>KindEditor< ...

  6. 在ASP.NET中使用KindEditor富文本编辑器

    以前一直用百度的UEditor.这次客户提了一个需求要在编辑器中插入Flash动画,但是不知道怎么用UEditor实现,于是选用了KindEditor. 更重要的一点是,客户的网站使用Framewor ...

  7. ASP.NET配置KindEditor文本编辑器

    文本编辑器:CKEditor和CKFinder  KindEditor 1.KindEditor KindEditor 是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果,开 ...

  8. 富文本编辑器kindeditor配置

    <!--富文本编辑器kindeditor配置↓ --> <link type="text/css" rel="stylesheet" href ...

  9. 使用kindeditor文本编辑器

    aspx中代码: <%@ Page Language="C#" ValidateRequest="false" AutoEventWireup=" ...

随机推荐

  1. java 写文本文件

    code 1:将特定String写入特定文件,不覆盖. import java.io.*; import java.util.*; public class OutputLog { public st ...

  2. lintcode : find peak element 寻找峰值

    题目 寻找峰值 你给出一个整数数组(size为n),其具有以下特点: 相邻位置的数字是不同的 A[0] < A[1] 并且 A[n - 2] > A[n - 1] 假定P是峰值的位置则满足 ...

  3. 解决Eclipse10配置Pydev不成功的问题

    本人在线配置还在本地配置后 重启Eclipse,Windows-Preferences中并无Python选项,新建项目也无Python可选 这个尝试了好多种方法,重新安装Eclipse10,重新安装j ...

  4. 在对话框上拖动按钮并移动该按钮(改写CXXButton::PreTranslateMessage,然后MoveWindow)

    // 派生自CButton类,主要过滤WM_LBUTTONDOWN .WM_LBUTTONUP和WM_MOUSEMOVE消息. BOOL m_bFlag = FALSE; // 成员变量,用来标示鼠标 ...

  5. Generic repository pattern and Unit of work with Entity framework

    原文 Generic repository pattern and Unit of work with Entity framework Repository pattern is an abstra ...

  6. SVN与Eclipse整合

    SVN与Eclipse整合 下载SVN插件(http://subclipse.tigris.org) 我们使用版本eclipse_svn_site-1.6.5.zip 解压到一个文件夹中 进入ecli ...

  7. Android 动态改变布局属性RelativeLayout.LayoutParams.addRule()

    我们知道,在 RelativeLayout 布局中有很多特殊的属性,通常在载入布局之前,在相关的xml文件中进行静态设置即可. 但是,在有些情况下,我们需要动态设置布局的属性,在不同的条件下设置不同的 ...

  8. ios ableviewcell的动态加载数据,模仿喜马拉雅动态数据加载

    iphone(UITableViewCell)动态加载图片http://developer.apple.com/library/ios/#samplecode/LazyTableImages/Intr ...

  9. hive 学习笔记——表的入门操作和命令

    1.受控表(managed table)包括内部表.分区表.桶表: 1.1.分区表 创建分区表: create table banji(id INT,name STRING) partitioned ...

  10. Support Library官方教程(1)概述

    Support Library The Android Support Library package is a set of code libraries that provide backward ...