Get started with eddy CDN

MIT licensed

Eddy is a library for real-time text analysis and language processing.

Tags:
  • event
  • driven
  • standard
  • ES3
  • ES5
  • ES6
  • DOM
  • node
  • rhino
  • nashorn
  • duk
  • browser
  • IE

Stable version

Copied!

How to start using eddy CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with eddy CDN - cdnhub.io</title>
  <style>
    #eddy-container {
      width: 100%;
      height: 100vh;
      border: 1px solid black;
    }
  </style>
</head>
<body>
  <div id="eddy-container"></div>
  <script src="https://cdn.cdnhub.io/eddy/0.7.0/eddy.dom.js"></script>
  <script>
    // Initialize Eddy
    const container = document.getElementById('eddy-container');
    const eddy = new window.Eddy({
      container,
      target: '.eddy-target',
      onReady: () => {
        console.log('Eddy is ready!');
      },
    });

    // Add some Eddy-enabled elements
    const eddyTarget = document.createElement('div');
    eddyTarget.className = 'eddy-target';
    eddyTarget.textContent = 'Hello, Eddy!';
    container.appendChild(eddyTarget);

    // Update Eddy when the text is changed
    const updateEddy = () => {
      eddy.update();
    };

    // Attach an event listener to update Eddy when the text is changed
    const textInput = document.createElement('input');
    textInput.type = 'text';
    textInput.addEventListener('input', updateEddy);
    container.appendChild(textInput);
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions