in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Open a dialog window on htmleditor and add a textbox

Last post 9/8/2008 7:10 AM by Sreejith A. 6 replies.
Page 1 of 1 (7 items)
Sort Posts:
Previous Next
  • 9/5/2008 2:17 AM

    Open a dialog window on htmleditor and add a textbox

    I am using an aspxhtmleditor control.is it possible to open a dialog window when we click on a custom toolbar button.In that dialog window add a textbox and if we type  any text in the textbox it will be printed on the textarea of editor.Please help me its urgent.

  • 9/5/2008 5:27 AM In reply to

    Re: Open a dialog window on htmleditor and add a textbox

    Hi!

    Currently, it's impossible to create a custom dialog. If this feature is very important for you, please add a new suggestion in our Support Center.

    Thanks,
    Andrew R

    R&D, ASP.Net Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 9/5/2008 5:54 AM In reply to

    Re: Open a dialog window on htmleditor and add a textbox

    Thanks for your kind help.

    I want another help.I add a customtoolbar and want to display an image in the editor using javascript;I put the source for the image in an hiddenfield.i attach the code below.

    function PasteEmailTemplate(commandName)
         {
         var imgSource=document.getElementById("ctl00_ContentPlaceHolder1_hidImgSource");
         //window.location="Mail.aspx?img="+imgSource;
        switch(commandName)
         {
            case('pastetemplate'):
                var htmlName=document.getElementById('ctl00_ContentPlaceHolder1_ASPxHtmlEditor1');
           
                HtmlEditor.ExecuteCommand(ASPxClientCommandConsts.SELECT_ALL, null);
                HtmlEditor.ExecuteCommand(ASPxClientCommandConsts.PASTEHTML_COMMAND, imgSource.value);
                break;
        }
        }

    hidImgSource.Value = "<img src='C:/Documents and Settings/All Users/Documents/My Pictures/Sample Pictures/Water lilies.JPEG' width='200' height='100'>";

     

    But the image is not displayed in the editor .what is the problem.

     

  • 9/5/2008 7:39 AM In reply to

    Re: Open a dialog window on htmleditor and add a textbox

    The problem is that you incorrectly define the image URL.
    How to define the image URL, see the following online resource:
    http://www.w3schools.com/tags/att_img_src.asp

    Thanks,
    Andrew R

    R&D, ASP.Net Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 9/6/2008 2:09 AM In reply to

    Re: Open a dialog window on htmleditor and add a textbox

    var imgSource=document.getElementById("ctl00_ContentPlaceHolder1_hidImgSource");    
         var a='<img src='+imgSource.value+'></img>';

     

    switch(commandName)
         {
            case('pastetemplate'):
                var htmlName=document.getElementById('ctl00_ContentPlaceHolder1_ASPxHtmlEditor1');
           
                HtmlEditor.ExecuteCommand(ASPxClientCommandConsts.SELECT_ALL, null);
                HtmlEditor.ExecuteCommand(ASPxClientCommandConsts.PASTEHTML_COMMAND, a);
                break;
        }

     

    I add one image like the code given above.How i add more images on customtoolbarclick.

  • 9/8/2008 6:24 AM In reply to

    Re: Open a dialog window on htmleditor and add a textbox

    Thanks,
    Andrew R

    R&D, ASP.Net Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 9/8/2008 7:10 AM In reply to

    Re: Open a dialog window on htmleditor and add a textbox

    Thanks for your kind help sir  .Actually i find the solution for that using a javascript code.

Page 1 of 1 (7 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED