elementor / elementor/elementor

Setting editor control values through javascript

Open
#4,941 10 comments 0 reactions 0 assignees View on GitHub
mod/r* request/enhancement
Dominant language
PHP
Stars
7.1k
Forks
1.6k
Avg merge
1d 5h
Merged PRs (30d)
193

Description

We're a creating a custom functionality where we should set values to different controls in the editor panel. So far, we could change the underlying model like this:

```javascript
elementor.hooks.addAction( 'panel/open_editor/widget', function( panel, model, view ) {
model.setSetting('text_field', 'sample text');
});
```

The widget reflects the updated values.

However, in the editor panel, this works for basic controls like text box. For others, like choose control, the radio button doesn't visually switch to updated value. We need a way to update both view and model combined.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.