Guten Tag
Ich habe in Problem, und zwar habe ich ein einen Code bestehend aus JS und Canvas.
Grob geht es um soetwas: https://developer.mozilla.org/en-US/docs/Can…yles_and_colors
Zitat
function drawShape(){ // get the canvas element using the DOM var canvas = document.getElementById('tutorial'); // Make sure we don't execute when canvas isn't supported if (canvas.getContext){ // use getContext to use the canvas for drawing var ctx = canvas.getContext('2d'); // Draw shapes ctx.fillRect(25,25,100,100); ctx.clearRect(45,45,60,60); ctx.strokeRect(50,50,50,50); } }
Hat jemand eine Idee wie ich das Ding korrekt einbinde? Am besten eben direkt im WP-Editor. Bisher hat alles nicht funktioniert, es bleibt alles weiß.
Wäre dafür sehr dankbar!