Issue T22292
Visible to All Users

Save the selected creator theme

created 18 days ago (modified 18 days ago)

[Ticket cloned from T22252: surveyjs with vite build is not working]

After upgrading with my vite version, seems build working fine.

The event which I mentioned not triggering when I change the theme itself like from Light to Dark from the drop down?

I just want to listen the theme name selection change to save user preferences, so that when they reopen my app, i can set the last selected theme.

Right Now I am doing that in save button click event, but I want to do that in right after user selects the theme.

Comments (3)

    Hello,
    I forwarded the following issue to our developers for further consideration: Creator Theme Settings – Implement the onThemeSelected function to handle theme changes in a creator.
    In the meantime, you may want to use a non-documented

    JavaScript
    const creator = new SurveyCreator(); creator.getPlugin("designer").themeModel.onThemeSelected.add((sender, options) => { const theme = options.theme; //... });

    We'll update you once we have any news to share. Please stay tuned.

      Attached the image. Seems there is no method that you mentioned

      Property 'themeModel' does not exist on type 'ICreatorPlugin'.

      FYI. I am using typescript

        Hi Venu,
        Please try the following code:

        JavaScript
        const creator = new SurveyCreator(); const designerPlugin: any = creator.getPlugin("designer"); designerPlugin.themeModel.onThemeSelected.add((sender, options) => { const theme = options.theme; //... });

        Answers approved by surveyjs Support

        created 6 days ago

        Hello Venu,
        The creator.onCreatorThemeSelected function is available with v1.12.28 and newer.

        Thank you