Call Elementor JS function from other JS script file - wordpress

I'm trying to initialise the Accordion JS function that already exists in Elementors' frontend script in my own file. I don't want to use a different accordion script since that is already on page.
As far as I can tell Elementor packs all of its JS using Webpack. Is there anyway to access that function? I know it live in wp-content/plugins/elementor/assets/js/accordion.a037e351fac33e9c9dfc.bundle.js but not sure how to use it.
Thank you.

Related

Will "Hello Elementor" automatically convert SCSS to CSS

I've just started using the WordPress page builder "Elementor" and have decided to move from "Genesis" to their own theme called "Hello Elementor". However, their theme uses SCSS and GruntJS.
On their documentation, they've included a custom.scss for all the custom styling. But when you add anything to this via WordPress, nothing happens. I know I could download the theme and use Visual Studio Code to make changes and use a sass compiler to automatically compile this for me, but it would require me to constantly upload files via FTP. Ideally, I would like to stay away from this.
Is there something I am missing? Or something I could do for WordPress to automatically compile this for me?
Edit:
If anyone has any recommendations of other themes to use with Elementor, I would really appreciate it.
They removed this option in Hello Elementor. You can no longer integrate custom scss. And I don't know since which version it's not present anymore, considering that I've tried the latest two ones and none of them seemed to accept the scss custom file.
However, you can check the answer they gave me a few days ago on the Hello Elementor GitHub page, if you want.
https://github.com/elementor/hello-theme/issues/85

PyCharm: How to disable certain CSS file code complete?

Django REST framework uses Bootstrap and has its own CSS files in it. It seems like PyCharm imports those files for code completion popups. The things is, I don't want those as I use different CSS framework and in fact, it's confusing me because all those Bootstrap autocomplete popups when I'm trying to set CSS classes and so on.
So my question is, is there any way I can disable code completion popups from certain CSS files?
I did not face with this problem until now,but I think you should disable these folders is Pycharm, try this :
Settings|Directories -> Use Exclude button on folder

WYSIWYG editor for MeteorJS with image upload options

I've tried most of the packages from https://atmospherejs.com/ but nothing seems to work with Meteor 1.3. Are there any editors for Meteor somewhat like Wordpress's TinyMCE?
I'm using React with Meteor and ES6. Trying to make a blog like CMS for myself.
(I've just started Meteor so I'm a noob in this platform)
TinyMCE got their own React module which worked for me - TinyMCE React
If anyone gets an error like: tinymce is not defined...
You can do-
Add a script in your footer :
src="//cdn.tinymce.com/4/tinymce.min.js"
Copy the whole script into your code, so that Meteor could merge it
for you
Add the script on a component level using dangerouslySetInnerHTML
function inside componentDidMount or anywhere you want

How to use a free bootstrap template in meteor

How to use a free bootstrap template (e.g., from startbootstrap.com) in meteor. I mean where the resources- html file, css folders and js folders of the free template should be put and what packages are needed to add/remove in meteor project file? I have tried it several times but got errors and the program crashes each time. I also transfer the script and link tags from section to section, but it did not work.
Just add the css of the template to the client of your Meteor project. Also, try using the nemo64:bootstrap package for Bootstrap. This will add some files to your project automatically, one of which will say is editable at the top. You can put your custom css in that file.
You can put the relevant html, css, and js files anywhere on the client. (Sticking it inside a folder called client will do that).
Image and font files should go in a folder called public.
You will need to make meteor templates from the HTML files. As is they will be missing any <template name="foo"> tags.
The css files can go anywhere under /client and they will automatically be added to the project. These are the easy ones.
The js files are the harder ones. If you put these under /client they will be wrapped by Meteor and will not have global scope. In all probability they won't work at all. You can put them under /public and modify your head.html file to include them to get around that problem. Odds are there won't be very many js functions in the free template anyway so you might want to read through them and see which ones you really need and then convert those to be proper template helpers or global functions on the client.

Wordpress styles from customiser into stylesheet

So I'm creating a WP theme and I have started building customisation for it, currently I have the styles go to the header and they are inline. Is there any way I can put them into a stylesheet after the options(get theme mod) have retrieved the information? Hope that makes sense. Or is it okay to have all the styles being inline in the header? It just seems really messy...
Thank you
Basic answer is : No, can not.
Because, the stylesheet is a css file, your get_theme_mod() or get_option() functions are wp core functions working in php script. Data is fetched through those functions and printed in header through wp_head(), the whole process is on the php files only.
So, no wp core function can print it inside stylesheet.
Also, I have never seen any theme or plugin doing so. But if you are very interested a custom built function can be written using 3 php functions: fopen() fwrite() fclose()
That function will write desired string inside the stylesheet, but have to be parsed in functions.php or atleast before <head></head>
I think it is an fairly unique idea (some do this in custom template editors), subjected to views of other people.

Resources