Bounty: 50
I’m working on a Elementor Project, I need urgent help to add few devices here. Since, ‘editor.min.js’ is on Elementor core file, but I need to add/Override few lines on this file.
What I’ve doing –
$wpse_devices = array(
'new_device' =>'.addDevice('WPSE', i.650)'
);
wp_localize_script( 'elementor-editor', 'wpse_editor', $wpse_devices );
Current Version is /*! elementor - v2.9.14 - 21-07-2020 */
On line#9738
initStylesheet: function initStylesheet() {
var breakpoints = elementorFrontend.config.breakpoints;
this.stylesheet = new Stylesheet();
this.stylesheet.addDevice('mobile', 0).addDevice('tablet', breakpoints.md).addDevice('desktop', breakpoints.lg);
}
I need it to Override this method on my project. It should be like –
initStylesheet: function initStylesheet() {
var breakpoints = elementorFrontend.config.breakpoints;
this.stylesheet = new Stylesheet();
this.stylesheet
.addDevice('mobile', 0)
.addDevice('tablet', breakpoints.md)
.addDevice('desktop', breakpoints.lg)
+ wpse_editor.new_device;
}
I’ve tried to find out many ways, but no luck. This file built with Webpack and Reactjs.
Any help will save me.