1

I am trying to make a simple shareable text editor with Mozilla's TogetherJS, but it does not seem to work. Based on their instructions, I added the library/script in the head and calling the JS from the button.

https://togetherjs.com/

In the Head tag:

<script src="https://togetherjs.com/togetherjs-min.js"></script>

In the body:

<button onclick="TogetherJS(this); return false;">Start TogetherJS</button>

Full code:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Test JS</title>
</head>
<body>
  <button onclick="TogetherJS(this); return false;">Start TogetherJS</button>

  <div>
    <textarea style="border:1px solid red; height:300px; width: 500px; font-size: 16px;">
   </textarea>
</div>

  <script src="https://togetherjs.com/togetherjs-min.js"></script>
  </body>
</html>

It seems to super-simple, yet for some reason, it does not seem to work!

Geocrafter
  • 765
  • 1
  • 6
  • 17

1 Answers1

0

Could you please check now wrap your script in the body i.e.

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Test JS</title>
</head>
<body>
  <button onclick="TogetherJS(this); return false;">Start TogetherJS</button>

  <script src="https://togetherjs.com/togetherjs-min.js"></script>
</body>
</html>
Himanshu Pandey
  • 688
  • 2
  • 8
  • 15
  • what error you getting, but I have checked its working. – Himanshu Pandey May 30 '20 at 20:37
  • Basically I can see the service starting, but the collaboration part is not working at all. Also, it seems they may have retired the service..so not sure what is going on. https://stackoverflow.com/questions/27584733/alternative-to-retired-togetherjs – Geocrafter May 30 '20 at 20:43