Java Script in TinyMCE

Need help? Please give a detailed explanation of your problem.
Post Reply
Fareed3487
AllPro Expert
AllPro Expert
Posts: 4
meble kuchenne Mikołów Knurów Czechowice-Dziedzice
Joined: Mon Jul 27, 2020 12:15 pm
Website: www.socialreachagency.com

Java Script in TinyMCE

Post by Fareed3487 »

I have a simple slider function in JavaScript, and it works on online compliers, but it seems like none of my JS code will work in Tiny.
Is there something I am missing, or is it even possible to use JS with Tiny?
Thank you
Fareed Khamitov
User avatar
Dave
Support Team
Support Team
Posts: 1221
Joined: Wed May 11, 2011 10:30 am
Website: www.allprowebtools.com
Contact:

Re: Java Script in TinyMCE

Post by Dave »

It is possible to use javascript. Please include more details about what you are doing and the problem you are encountering.
Fareed3487
AllPro Expert
AllPro Expert
Posts: 4
Joined: Mon Jul 27, 2020 12:15 pm
Website: www.socialreachagency.com

Re: Java Script in TinyMCE

Post by Fareed3487 »

<h2>JavaScript in Body</h2>

<p id="demo">A Paragraph.</p>

<button type="button" onclick="myFunction()">Try it</button>

<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph changed.";
}
</script>

This is the tester function I got from W3schools to test. Should change "A paragaraph" to "Paragraph Changed" after a click on the button. It does work on online html complier and the W3 complier, but when I use it in tiny the button is not clickable. Same problem was with the slider, the arrows were non-responsive.

Thank you.
User avatar
Dave
Support Team
Support Team
Posts: 1221
Joined: Wed May 11, 2011 10:30 am
Website: www.allprowebtools.com
Contact:

Re: Java Script in TinyMCE

Post by Dave »

Please provide the URL so that we can inspect the code.
Fareed3487
AllPro Expert
AllPro Expert
Posts: 4
Joined: Mon Jul 27, 2020 12:15 pm
Website: www.socialreachagency.com

Re: Java Script in TinyMCE

Post by Fareed3487 »

Post Reply