[CLOSED] HtmlEditor.Call("append", "xxx") does not work

  1. #1

    [CLOSED] HtmlEditor.Call("append", "xxx") does not work

    my ext.net version is 2.4
    protected void MultiUpload1_FileUpload(object sender, FileUploadEventArgs e)
            {
                he_cont.Call("append", "ssssssssss");//the code can not work well, when i click upload button and selected a pic, there is no "ssssssssss" in the HtmlEditor,why?
            }
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm20.aspx.cs" Inherits="extdemo.test.WebForm20" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server"  ></ext:ResourceManager>
            <ext:MultiUpload ID="MultiUpload1" runat="server" AnchorHorizontal="25%" AutoStartUpload="true"
                FileDropAnywhere="true"
                FileSizeLimit="15 MB"
                FileTypes="*.jpg;*.png;*.gif"
                FileTypesDescription="All Files"
                FileUploadLimit="100"
                FileQueueLimit="0" OnFileUpload="MultiUpload1_FileUpload">
                <Button>
                    <ext:Button ID="btn_upload" runat="server" Text="上传图片..." />
                </Button>
                <Listeners>
                    <UploadStart Handler="Ext.Msg.wait('上传中');" />
                    <UploadComplete Handler="Ext.Msg.hide();" />
                </Listeners>
            </ext:MultiUpload>
            <ext:HtmlEditor runat="server" ID="he_cont" FieldLabel="内容" AnchorHorizontal="100%" AnchorVertical="-112"></ext:HtmlEditor>
        </form>
    </body>
    </html>
    Last edited by Daniil; Feb 18, 2014 at 2:31 AM. Reason: [CLOSED]
  2. #2
    Hi @hdsoso,

    Thank you for the report. Fixed in the trunk, revision #5669. It will go to the v2.5 release.

    Now you can call an htmlEditor's Append method.
    this.HtmlEditor1.Append("the text to append");
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @hdsoso,

    Thank you for the report. Fixed in the trunk, revision #5669. It will go to the v2.5 release.

    Now you can call an htmlEditor's Append method.
    this.HtmlEditor1.Append("the text to append");
    it can be used in code behind if i use v2.4 release?
  4. #4
    No, it cannot.

    But you can add the JavaScript methods for HtmlEditor and still use:
    this.HtmlEditor1.Call("append", "text");
  5. #5
    Quote Originally Posted by Daniil View Post
    No, it cannot.

    But you can add the JavaScript methods for HtmlEditor and still use:
    this.HtmlEditor1.Call("append", "text");
    i mean if i use 2.4 version , how to do?
  6. #6
    Please add this script into a page's <head>.
    Ext.form.field.HtmlEditor.override({
        append: /* please take the code from the SVN revision #5669 */
        appendLine: /* please take the code from the SVN revision #5669 */
    });
    and still use:
    this.HtmlEditor1.Call("append", "text");
  7. #7
    Quote Originally Posted by Daniil View Post
    Please add this script into a page's <head>.
    Ext.form.field.HtmlEditor.override({
        append: /* please take the code from the SVN revision #5669 */
        appendLine: /* please take the code from the SVN revision #5669 */
    });
    and still use:
    this.HtmlEditor1.Call("append", "text");
    thanks.work perfect.

Similar Threads

  1. Replies: 6
    Last Post: May 31, 2013, 3:04 AM
  2. [CLOSED] How does "MaskCls" work for "AutoLoad" mask in panel control
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 19, 2012, 12:09 PM
  3. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  4. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM
  5. Replies: 2
    Last Post: Jun 26, 2011, 1:59 AM

Posting Permissions