https://github.com/rozek/sharedtextarea
a small programming experiment implementing a shared plain text editor based on Automerge
https://github.com/rozek/sharedtextarea
Last synced: about 1 month ago
JSON representation
a small programming experiment implementing a shared plain text editor based on Automerge
- Host: GitHub
- URL: https://github.com/rozek/sharedtextarea
- Owner: rozek
- License: mit
- Created: 2024-03-20T16:04:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-20T16:48:00.000Z (about 1 year ago)
- Last Synced: 2025-01-29T20:29:15.460Z (3 months ago)
- Language: HTML
- Size: 1.65 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# sharedTextArea #
a small programming experiment implementing a shared plain text editor based on Automerge
([live demo](https://rozek.de/automerge/sharedTextArea.html))
This experiment is the counterpart of the [sharedTextValue](https://github.com/rozek/sharedTextValue) example which was built during the "Automerge Build Day/1".
It takes care of the various steps needed to load automerge and either create a new or open an existing document.
Once ready, automerge is used to share all text editing operations between any clients - and some extra code lines try to guarantee that these clients do not interfere with each other while editing the same text (even selection ranges should be kept intact)
If you want to see a live demo, just navigate to [https://rozek.de/automerge/sharedTextValue.html](https://rozek.de/automerge/sharedTextArea.html). Open it twice in two browser windows and see how changes in one window affect the other one - and vice versa.
### Current Limitations ###
* it seems to be difficult to select some text while somebody else is working - even if both reanges do not overlap. This _may_ be a problem of the approach used to detect and update selections - perhaps, a `contenteditable` may be better than a `textarea` in this situation
## License ##
[MIT License](LICENSE.md)