主题: 怎么给editor赋值啊
作者: 紫翼小白, 发布日期: 2010-09-13 14:46:28, 浏览数: 6074

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="admin_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
            <script type="text/javascript" charset="utf-8" src="../editor/kindeditor.js"></script>

        <script type="text/javascript">
       KE.show({
            id : "KIDContent"});
       
        KE.html("KIDContent",'aaaa' );
        </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <textarea id="KIDContent" name="KIDContent" cols="50" rows="10"></textarea>
    </div>
    </form>
</body>
</html>

 

editor显示出来了,但没有内容

作者: Roddy, 发布日期: 2010-09-13 14:55:00

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="admin_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
            <script type="text/javascript" charset="utf-8" src="../editor/kindeditor.js"></script>

        <script type="text/javascript">
       KE.show({
            id : "KIDContent"});
        </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <textarea id="KIDContent" name="KIDContent" cols="50" rows="10">aaaaa</textarea>
    </div>
    </form>
</body>
</html>

回复
作者: Roddy, 发布日期: 2010-09-13 14:56:12

或者

KE.show({
    id : "KIDContent"
    afterCreate : function(id) {
        KE.html(id, 'aaaaa');
    }        
});

回复
发表新帖 发表回复