jQuery UI Widgets Forums General Discussions What is the cleanest way to switch jqxEditor between dark and light themes dynam

This topic contains 1 reply, has 2 voices, and was last updated by  admin 1 week, 5 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • jovanovic
    Participant

    Hi everyone, I am working on an internal admin dashboard with Editor.

    I am currently trying to solve this: What is the cleanest way to switch jqxEditor between dark and light themes dynamically in a Vue app?

    So far, I tried a couple of approaches from forum threads, but state gets out of sync after user interactions.

    What approach would you recommend here?


    admin
    Keymaster

    Hi jovanovic,

    The cleanest approach is to let Vue own the current theme state and treat jqxEditor as a view that reacts to it. Store the active theme in a reactive variable (or a global store such as Pinia/Vuex), watch for theme changes, and update the editor by applying the appropriate jqx theme class or reconfiguring the widget as needed. Avoid mutating the editor directly from multiple places, as this can leave its internal state out of sync after user interactions. If your application supports runtime theme switching, keep all theme-related logic in a single composable or plugin so the editor, along with the rest of the UI, responds consistently. This centralizes theme management, minimizes state synchronization issues, and makes future theme additions straightforward.

    Regards,
    Peter

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.