Ticket T263833
Visible to All Users

ASPxHtmlEditor - Custom default dialogs after 14.2?

created 10 years ago

Hello,

I had my default dialogs highly customized in ASPxHtmlEditor in 13.2 prior to upgrading to 15.1 - some dialogs had additional input fields with extra logic in the back end and extra scripts on the client side (which accepted / passed some custom parameters), every one of the dialogs had custom OK / Cancel buttons matching my application UI style (via skins), etc. Just imagine that everything which could be customized was customized and extended.

Now, when I've upgraded from 13.2 to 15.1 I see that my custom dialogs cause ASPxHtmlEditor to crash (because some Spell Checker settings no longer match the obsolete dialog template). Also, I found out that other dialogs crash, because the DevExpress.Web.ASPxClasses namespace which was broadly used in the 13.2 dialog templates (specifically, some methods from the DevExpress.Web.ASPxClasses.Internal namespace) is no longer available.

I do understand why you wanted to get rid of the dialogs customization feature: indeed, it's a pain to update the dialogs between versions. As I figured out from other posts, you are currently working on implementing a new, more painless, way to customize the dialogs. However, is there something you can recommend for my use case in the meantime? As I see, the current customization capabilities for the dialogs are quite limited, so I definitely cannot get rid of the customized dialog controls and migrate to some new approach at this point. An ideal solution for me would be to get new versions of the .ascx dialog controls even though (yes, yes, I know) this feature is no longer available since 14.2. If I get the new versions of controls, I would be able to customize them anew to fit my needs and make them work.

Also, I'd like to learn more on what your plans regarding the default dialogs customization are. My customization use case is probably a corner case for you, because I do need all the default features of the Insert Link / Insert Image dialogs and at the same time I add a lot of my own functionality on top of the existing one to both dialogs (just let me know if you're interested in details and I'll provide them). I'm very concerned that after some point (say, after upgrading to 15.2) I'll see a notice like: "sorry, guys, your customized dialogs are no longer supported, so now is a good time to get rid of all your custom functionality or to re-implement all the standard image settings (size settings, style settings) and their client-side handling logic on your own".

Nickolay, Software Architect
ClickHelp - Online Documentation Tool
http://clickhelp.co

Comments (1)

    After struggling with adapting my old customized dialog controls from 13.2 to 15.1 for several hours I have to admit it takes too much time and efforts to adapt them. Please provide me with 15.1 versions of ImagePropertiesForm.ascx, InsertImageForm.ascx and InsertLinkForm.ascx so I can customize them for my needs - otherwise, I'm unable to make my existing project to work after migration to 15.1 as the editor is a critical part for it :(
    I agree to get just those three and remove my customization of other dialogs to save time. The 13.2 => 15.1 upgrade has already consumed a lot of resources due to differences in a lot of places (themes, those custom ASPxHtmlEditor dialogs, various obsolete properties and other API changes, etc.), so I just can't afford investing so much in upgrading from version to version.
    Nickolay, Software Architect
    ClickHelp - Online Documentation Tool
    http://clickhelp.co

    Answers approved by DevExpress Support

    created 10 years ago (modified 9 years ago)

    Hello Nickolay,

    Indeed, we chose the path where customization of the standard dialogs is no longer supported. They are now created at runtime, that is why there are no "15.1" version of those dialogs. We provide a way to slightly modify the default render: use the SettingsDialogs property to select the necessary dialog and customize its templates:

    ASPx
    <SettingsDialogs> <InsertImageDialog> <MoreOptionsSectionTemplate> more </MoreOptionsSectionTemplate> <TopAreaTemplate> top </TopAreaTemplate> <BottomAreaTemplate> bottom </BottomAreaTemplate> </InsertImageDialog> </SettingsDialogs>

    However, this wouldn't allow customizing the logic of the default editors inside the dialogs.

    We've discussed this scenario and decided that the best approach would be hiding the default buttons and implementing the Custom Dialogs instead. Not only it is easy to support them between releases, they also allow you to use any user control inside as you can see in the demo.
    I understand that it will take some time to copy the default functionality, but I believe that it is the best way to resolve the current situation.

    Updated:

    Attached is the modified project that now contains a possible implementation of the "Insert Image" dialog. I've slightly modified the "Insert Link" dialog as well, to remove jQuery and change the dialog footer.
    I believe that the provided implementation should be sufficient to serve as the basis for other dialogs as well. The main idea is that the original content is modified by the client-side ExecuteCommand method. Note that you can always check how any dialog functionality is implemented by checking the JS code that is loaded by the browser (DXR.axd). In addition, we are always happy to answer any question that may arise during implementation.

    Updated by Pavlo

    I've attached the modified project, which contains a possible implementation of the "Insert Video" dialog.
    The video insertion is controlled by the ExecuteCommand method with corresponding arguments (see the InsertVideo.js file for more information about these arguments).
    If you have any questions regarding the implementation of the custom dialog, feel free to ask.

      Show previous comments (43)

        Hello,
        I attached video with my steps. In editor window I type letters "qwertzuiop" and same letters I type in dialog textboxes. But letter Z is not write to textbox.
        Michal

        DevExpress Support Team 9 years ago

          Hello Michal,

          Thank you for your clarification. This issue looks very similar to the one described at ASPxHtmlEditor - It is impossible to type "z" in the lower case in the "URL" or "E-mail to" field when inserting a link in IE. That issue is fixed starting with version 15.1.6. If you are using an older 15.1 version, I recommend you upgrade your project to the recent version 15.1.8.
          Please let me know if this helps.

            Hi Vladimir,
            thank you for your response. You are right,  after upgrade to latest version dialogs working fine.
            Michal

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.