elementor / elementor/elementor

Ajax controls for widget on editor side with JS controls for Dev

Open
#13,252 3 comments 26 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

## Prerequisites
- [x] I have searched for similar features requests in both open and closed tickets and cannot find a duplicate.
- [x] The feature is still missing in the latest stable version of Elementor ( Elementor Pro. )

**What problem is your feature request going to solve? Please describe.**
As WordPress is widely used as CMS and platform for development, I'm not an exception. I use WordPress in90% of my projects, from a simple website to a experience with an advanced front-end (SPA, Threejs, PixiJS ...). Since I'm elementor user, I add to every WP project and my customers are really happy about the tool and the ability to create rich content on their own.

I was really frustrated to have issues with AJAX loaded content, booth on CSS and JS! Finaly i found a (not really neat) workaround. The way that elementor is built is not really AJAX friendly... Come on guys we are 2020, and we cannot accept to keep AJAX out tech scope of elementor.

**Describe the solution you'd like**
Some addition would provide Elementor a new powerful layer for richer interface built with elemetor

**On the dev side**
- Adding a way to re-apply a single widget controller through the use of elementorFrontend should be a great addition.
```
$('.elementor-widget').each((myElementDomNode)=>{
myElementDomNode.applyController()
//or
elementorFrontend.elementManager.applyController(myElementorDomNode)
//or through hook
elementorFrontend.triggerHook(`frontend/element_ready/${myElementorDomNode.data('widget_type')}`)
})
```

**On the editor side**
- Widget controls in the advanced tab should have an option to be flagged as "sticky" to prevent the reinit process when called (eg: usefull for menu, popup, cart ).
- Containers (column, section) should have an "ajax target" id to allow injecting ajax content on the fly !
- Button, link, and other "page reload behavior" elements must have an "ajax options" set to define where content behind the link must be injected.

**Describe alternatives you've considered**
Currently i'm using ```window.elementorFrontend.init() ```, that do the job but have side effect for those widgets that I won't re-apply JS controllers. (menu, pop-up, cart ...)

**Additional context**
https://www.dropbox.com/s/bedesk3u0i73g6w/Capture%20d%E2%80%99%C3%A9cran%202020-12-08%20%C3%A0%2011.47.13.png?dl=0

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.