JSFiddle - React, Tailwind, and code Playground

by Ben Gillbanks

HTML

<script src="https://raw.githubusercontent.com/bahamas10/wordsearch.js/master/wordsearch.js"></script>
  <h2>Word Search Maker</h2>

  <label for="wordList">Enter words (comma-separated): </label>
  <input type="text" id="wordList" value="hello,goodbye,orange,yellow,green,blue">
  <button onclick="generateWordSearch()">Generate Word Search</button>

  <h3>Word Search</h3>
  <table id="wordSearchTable"></table>

JavaScript

const wordListInput = document.getElementById('wordList');
const wordList = wordListInput.value.split(',').map(word => word.trim());

const search = wordsearch(wordList, 40, 40);
console.log(search);