<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExtendedEditor.ascx.cs" Inherits="Web.Admin.Controls.ExtendedEditor" %>
<asp:HiddenField ID="HiddenFieldEditorValue" Value="" runat="server" />
<!--start-->
<div>
    <div id="EditorTemplate" runat="server">
        <!--编辑器模板区域-->
    </div>
    <script type="text/javascript">
        function extendeSetEditorContent(data) {
        }
        function extendeGetEditorContent() {//向下兼容
        }
    </script>
</div>
<script type="text/javascript">
    function editorload_<%=this.ClientID%>(){
        editor_<%=this.ClientID%>.load({"uploadpath":"<%=EditorUploadUrl%>","value":document.getElementById(<%=this.ClientID%>.servervalid).value});//加载并赋初值
        var formlist=document.getElementsByTagName("form");//为所有form添加事件
        for(var i=0;i<formlist.length;i++)
        {
            if (window.attachEvent) {
                formlist[i].attachEvent('onsubmit', function(){
                    <%=this.ClientID%>.get();
                });
            }
            else {
                formlist[i].addEventListener('submit', function(){
                    <%=this.ClientID%>.get();
                }, false);
            }
        };
    }
    var <%=this.ClientID%>={
        servervalid:"<%=HiddenFieldEditorValue.ClientID%>",
        get:function(){
            return document.getElementById(<%=this.ClientID%>.servervalid).value=editor_<%=this.ClientID%>.get();//取值
        },
        set:function(txt){
            return editor_<%=this.ClientID%>.set(txt);
        }
    };
        editorload_<%=this.ClientID%>();

</script>
<!--end-->
