博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
EXT.NET 使用 Ueditor编辑器,并在后台获取的方法
阅读量:5338 次
发布时间:2019-06-15

本文共 1560 字,大约阅读时间需要 5 分钟。

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();

          
        }

转载于:https://www.cnblogs.com/ggbbeyou/archive/2011/12/30/2307574.html

你可能感兴趣的文章
python+selenium之验证码的处理
查看>>
Foundation框架 - NSException类
查看>>
MongoDB Shell 经常使用的操作
查看>>
POJ - 2991 Crane (段树+计算几何)
查看>>
XML学习笔记
查看>>
cacti气象图调整(批量位置调整、更改生成图大小等)
查看>>
多态应用-主人与宠物玩耍案例
查看>>
Python拼接两个TXT文件(遍历文件夹,去除重复记录)
查看>>
Jenkins+SVN+Maven+shell 自动化部署实践
查看>>
nginx and node.js配合使用 helloworld
查看>>
JavaScript--History 对象
查看>>
RabbitMQ各协议异同详解
查看>>
基于 Python 的性能测试工具 locust 与 LR 的简单对比[转发]
查看>>
Hanio汉诺塔代码递归实现
查看>>
Java实现多种方式的http数据抓取
查看>>
[原创]C++ Test测试工具介绍
查看>>
【Java学习01】:win7环境安装JDK
查看>>
ios 时间解析 差8个小时
查看>>
利用Solid Converter PDF提取并重用PDF中的图像
查看>>
SQL左链接、右链接、全链接的区别
查看>>