sharedb-generic-binding
Base class for binding sharedb's text diff data operations sent to a generic HTML element. Implementation of curran's commit to enable StringBinding, binding.setup() on non-textarea HTML elements.
Usage
npm install sharedb-generic-binding --save
Then use familiar code to bind to a ShareDB connection.
// Require it.const ShareGenericBinding = ; // Setup the connection.const socket = 'ws://YOUR_HOST:YOUR_PORT' socketOptions;const connection = socket;const doc = connection; // Subscribe to the document.doc;