Cannot run script properly with my custom plugin

I figured this out, maybe it will help someone – probably, my script was loading on the header, so html was loading after script fired. What I did was adding those few parameters, where this last ‘true’ is the most important (moves script to footer). Hope this helps to anyone wp_enqueue_script(‘js-file’, plugin_dir_url(__FILE__).’/js/plugin_pj_script.js’, ”, ‘1.0.0’, true);

Javascript embedded disappears for editors

WordPress Multisite disallows the unfiltered_html capability for non-super-admin (ie, any users who are not capable of performing network administration). Anyone without the unfiltered_html capability will not be able to save post content with disallowed HTML tags, including <script> tags. A quick search shows that there have been attempts at modifying this behaviour, but they may … Read more