7 / 100

how can i use this code with wordPress website

<!DOCTYPE html>
    <title>Text to Image Generator</title>
      #canvas {
        border: 1px solid black;
      <label for="text-input">Enter Text:</label>
      <input type="text" id="text-input" />
      <button onclick="drawText()">Generate Image</button>
    <canvas id="canvas"></canvas>
      function drawText() {
        var canvas = document.getElementById("canvas");
        var ctx = canvas.getContext("2d");
        var text = document.getElementById("text-input").value;
        ctx.font = "30px Arial";
        ctx.fillText(text, 10, 50);
Text to Image Generator
Text to Random Image Generator
Text to Image Generator

Leave a Comment