<%@ page language="VB" autoeventwireup="false" inherits="exam_editpaper_editpaper2, App_Web_4fcdyx4d" validaterequest="false" %>

<!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" src="../../../richedit/fckeditor.js"></script>
</head>
<body style="background-color: Gray">
    <form id="form1" runat="server">
    <div style="margin:0px; ">
        <script type="text/javascript">
<!--
            // Automatically calculates the editor base path based on the _samples directory.
            // This is usefull only for these samples. A real application should use something like this:
            // oFCKeditor.BasePath = '/fckeditor/' ;	// '/fckeditor/' is the default value.
            var sBasePath = "/richedit/";

            var oFCKeditor = new FCKeditor('FCKeditor1');
            oFCKeditor.BasePath = sBasePath;
            oFCKeditor.Height = 380;
            // Set the custom configurations file path (in this way the original file is mantained).
            oFCKeditor.Config['CustomConfigurationsPath'] = sBasePath + '_samples/html/sample06.config.js';

            // Let's use a custom toolbar for this sample.
            oFCKeditor.ToolbarSet = 'mytool';

            oFCKeditor.Value = '<%= getText() %>';
            oFCKeditor.Create();


            function FCKeditor_OnComplete(editorInstance) {
                //init(parent.tests);allTags[0].tagObj.onclick() ;

            }
            function getEditorValue() {
                //得到编辑器的值
                var oEditor = FCKeditorAPI.GetInstance('FCKeditor1');
                if (oEditor.EditMode == FCK_EDITMODE_WYSIWYG)
                { return oEditor.GetXHTML(true); }
                else
                { var t = oEditor.GetHTML(false); return t; }
            }

            function getValue() {
                document.getElementById("<%= newscontent.ClientId() %>").value = getEditorValue();


            }
//-->
                </script>

                <asp:TextBox ID="newscontent" runat="server" Style="display: none"></asp:TextBox><asp:RequiredFieldValidator
                    ID="RequiredFieldValidator2" runat="server" ErrorMessage="请输入内容" ControlToValidate="newscontent"></asp:RequiredFieldValidator>
        <p style="text-align:center"><asp:Button ID="Button1" runat="server" Text="保存" OnClientClick="getValue();" /></p>
            
    </div>
    
    </form>
</body>
</html>
