CuteEditor ShowDialog from outside the editor

Last post 10-08-2010, 7:04 AM by pauluz. 2 replies.
Sort Posts: Previous Next
  •  10-07-2010, 10:12 AM 64351

    CuteEditor ShowDialog from outside the editor

    Hello,
     
    I have a question about the function ShowDialog in the CuteEditor.
     
    On my form I have 1 textbox for the subject of an email and below that a CE (Editor1) for the Body of the email. I've made a custom button and the ShowDialog is working perfectly. I've made a page where the user can select predefined Tags that will be replaced by data from the database once the e-mail gets send. In the popup is some code to do some PasteHTML to the current editor. This works fine.
     
    Also, next to the Subject field is a button to open a dialog and to pick a Tag. Same a with the CE, the tagvalue gets inserted into the textbox at the current position. I just get the instance of the Editor1 in javascript (getElementByID(<%=Editor1.ClientID%>)) and call editor.ShowDialog(...);
     
    But on an other page there is no CuteEditor visible, so i can't get an instance of that Editor to do a editor.ShowDialog(..). Is there also a ShowDialog function apart from an instance of an editor that I can call?
     
    I saw something about Window_ShowDialog() but cant find anything about that and wonder if these scripts are always avaiable even with no editor on the page.
     
    Please some help.
     
     
  •  10-08-2010, 4:56 AM 64357 in reply to 64351

    Re: CuteEditor ShowDialog from outside the editor

    Hi pauluz,
     
    ShowDialog is the method of CuteEditor, so if you have not editor instance in that page, you can not use this method.
     
    Maybe you can create a simple example and show me what you need to achieve, I will try make a new solution for you.
     
    Please send the example to [email protected], just send the example pages, do need the CuteSoft_Client folder.
     
    Regards,
     
    ken 
  •  10-08-2010, 7:04 AM 64359 in reply to 64357

    Re: CuteEditor ShowDialog from outside the editor

    Hi Kenneth,
     
    I got it working now by using a work-around. What i did is put a cuteeditor instance on the page and set the width and height to 1 (just as with the "Use Cute Editor als image selector"). It works, but I think it's overkill to have an CuteEditor instance on the page while not making any use of it, except for the showDialog function. 
     
    I want to have the same modal popup window thru my entire application, but I wondering if I want to instance the Editor everywhere.
     
    I'm going to try to duplicate the popup first. I think the CE popup is made with JQuery Dialog as backbone, so I guess that I just have to fix the styling.
     
    If I get stuck somewhere, I will let you know. It would be nice, just as for the Image Selector, to have some javascript functions outside the CuteEditor class for such cases.
     
    Regards,
     
    Paul
View as RSS news feed in XML