zoukankan      html  css  js  c++  java
  • EXT.NET 使用 Ueditor编辑器,并在后台获取的方法

    1.HTML页面如下代码

      <ext:resourcemanager id="ResourceManager1" runat="server">
            </ext:resourcemanager>
            <ext:panel id="Panel1" runat="server" title="" frame="true" layout="Fit" buttonalign="Center"
                autoheight="true">
                <Buttons>
                    <ext:Button ID="Button1" runat="server" Icon="DiskEdit" Text="保 存" >
                        <DirectEvents>
                            <Click OnEvent="Button1_DirectClick">  
                                  <ExtraParams> 
                                    <ext:Parameter Name="myGetEditor" Mode="Raw" Value="getEditText()" />                              
                                 </ExtraParams>            
                            </Click>                       
                        </DirectEvents>
                    </ext:Button>
                    <ext:Button ID="Button2" runat="server" Icon="Cancel" Text="关 闭">
                        <Listeners>
                            <Click Handler="parent.window.tmpWin.close();" />
                        </Listeners>
                    </ext:Button>
                </Buttons>
                <Items>
                    <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Frame="true" DeferredRender="false"
                        AutoHeight="true">
                        <Items>
                            <ext:Panel ID="Panel2" runat="server" Title="获取编辑器信息" Frame="true" AutoHeight="true"
                                Padding="6" ItemCls="blueborder" Layout="Form">
                                <Items>                        
                                 
                                   
                                    <ext:TextArea runat="server" id="tbEditor" />
                               
                                </Items>
                            </ext:Panel>
                         
                         
                         
                        </Items>
                    </ext:TabPanel>
                </Items>
            </ext:panel>
          
        </div>
        </form>
         <script type="text/javascript">
             var editor;
             Ext.onReady(function () {

                  editor = new baidu.editor.ui.Editor({
                     iframeCssUrl: '/Editors/ueditor/themes/default/iframe.css',
                     textarea: 'myEditor'
                 });
                 editor.render("tbEditor");     

             })
             var getEditText = function () {        
               return editor.getContent();          
             
             }      

        </script>

    2.后台获取的事件:

       protected void Button1_DirectClick(object sender, Ext.Net.DirectEventArgs e)
            {
               

               string 编辑器内容 = e.ExtraParams["myGetEditor"].ToString();
              
            }

  • 相关阅读:
    Jmeter配置slave
    Jmeter集合ant进行操作
    PageObject设计模式进行自动化用例的设计方法
    同学,迭代器生成器了解一下
    面向对象的一些方法与属性
    断言与异常
    wtforms-表单生成及验证
    DBUtils--数据库连接池
    Flask请求流程超清大图
    PEP8规范
  • 原文地址:https://www.cnblogs.com/ggbbeyou/p/2307574.html
Copyright © 2011-2022 走看看