I'm building a custom Elementor extension and need to access the attributes (settings/controls) of the currently selected widget in the Elementor editor using JavaScript.
So far, I’ve tried inspecting panelView and various parts of the elementor JS namespace. However, I can't seem to get a reliable reference to the currently active widget instance (the widgetModel) in order to call getSetting() or inspect its data.
There can be multiple widgets of the same type on the page, so I need the specific instance that is currently being edited.
I’ve tried using jQuery to find elements with data-setting or tracing the view stack, but nothing solid so far.
How can I get the currently active widget's model (widgetModel) in Elementor editor so I can inspect or manipulate its settings?