merge
This commit is contained in:
		
						commit
						1e30a877e6
					
				@ -37,16 +37,3 @@ Y({
 | 
				
			|||||||
  // bind quill to richtext type
 | 
					  // bind quill to richtext type
 | 
				
			||||||
  y.share.richtext.bind(window.quill)
 | 
					  y.share.richtext.bind(window.quill)
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					 | 
				
			||||||
Y({
 | 
					 | 
				
			||||||
  db: {
 | 
					 | 
				
			||||||
    name: 'indexeddb'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  connector: {
 | 
					 | 
				
			||||||
    name: 'websockets-client',
 | 
					 | 
				
			||||||
    room: 'test42'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  share: {
 | 
					 | 
				
			||||||
    state : 'Map'
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}).then((y) => { window.y = y })
 | 
					 | 
				
			||||||
							
								
								
									
										20
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								README.md
									
									
									
									
									
								
							@ -1,8 +1,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# 
 | 
					# 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Yjs is a framework for p2p shared editing on structured data like (rich-)text, json, and XML.
 | 
					Yjs is a framework for offline-first p2p shared editing on structured data like text, richtext, json, or XML.
 | 
				
			||||||
It is similar to [ShareJs] and [OpenCoweb], but easy to use.
 | 
					It is fairly easy to get started, as Yjs hides most of the complexity of concurrent editing.
 | 
				
			||||||
For additional information, demos, and tutorials visit [y-js.org](http://y-js.org/).
 | 
					For additional information, demos, and tutorials visit [y-js.org](http://y-js.org/).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Extensions
 | 
					### Extensions
 | 
				
			||||||
@ -91,17 +91,17 @@ bower i yjs y-memory y-webrtc y-array y-text
 | 
				
			|||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Here is a simple example of a shared textarea
 | 
					Here is a simple example of a shared textarea
 | 
				
			||||||
```
 | 
					```HTML
 | 
				
			||||||
  <!DOCTYPE html>
 | 
					  <!DOCTYPE html>
 | 
				
			||||||
  <html>
 | 
					  <html>
 | 
				
			||||||
    <body>
 | 
					    <body>
 | 
				
			||||||
      <script src="./bower_components/yjs/y.js"></script>
 | 
					      <script src="./bower_components/yjs/y.js"></script>
 | 
				
			||||||
 | 
					      <!-- Yjs automatically includes all missing dependencies (browser only) -->
 | 
				
			||||||
      <script>
 | 
					      <script>
 | 
				
			||||||
        Y({
 | 
					        Y({
 | 
				
			||||||
          db: {
 | 
					          db: {
 | 
				
			||||||
            name: 'memory' // use memory database adapter.
 | 
					            name: 'memory' // use memory database adapter.
 | 
				
			||||||
            // name: 'indexeddb'
 | 
					            // name: 'indexeddb' // use indexeddb database adapter instead for offline apps
 | 
				
			||||||
            // name: 'leveldb'
 | 
					 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          connector: {
 | 
					          connector: {
 | 
				
			||||||
            name: 'webrtc', // use webrtc connector
 | 
					            name: 'webrtc', // use webrtc connector
 | 
				
			||||||
@ -117,9 +117,9 @@ Here is a simple example of a shared textarea
 | 
				
			|||||||
          // The Yjs instance `y` is available
 | 
					          // The Yjs instance `y` is available
 | 
				
			||||||
          // y.share.* contains the shared types
 | 
					          // y.share.* contains the shared types
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
          // Bind the textarea to y.share.textarea
 | 
					          // Bind `y.share.textarea` to `<textarea/>`
 | 
				
			||||||
          y.share.textarea.bind(document.querySelector('textarea'))
 | 
					          y.share.textarea.bind(document.querySelector('textarea'))
 | 
				
			||||||
        }
 | 
					        })
 | 
				
			||||||
      </script>
 | 
					      </script>
 | 
				
			||||||
      <textarea></textarea>
 | 
					      <textarea></textarea>
 | 
				
			||||||
    </body>
 | 
					    </body>
 | 
				
			||||||
@ -134,6 +134,9 @@ Report _any_ issues to the [Github issue page](https://github.com/y-js/yjs/issue
 | 
				
			|||||||
# API
 | 
					# API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Y(options)
 | 
					### Y(options)
 | 
				
			||||||
 | 
					* Y.extend(module1, module2, ..)
 | 
				
			||||||
 | 
					  * Add extensions to Y
 | 
				
			||||||
 | 
					  * `Y.extend(require('y-webrtc'))` has the same semantics as `require('y-webrtc')(Y)` 
 | 
				
			||||||
* options.db
 | 
					* options.db
 | 
				
			||||||
  * Will be forwarded to the database adapter. Specify the database adaper on `options.db.name`.
 | 
					  * Will be forwarded to the database adapter. Specify the database adaper on `options.db.name`.
 | 
				
			||||||
  * Have a look at the used database adapter repository to see all available options.
 | 
					  * Have a look at the used database adapter repository to see all available options.
 | 
				
			||||||
@ -259,6 +262,3 @@ Yjs is licensed under the [MIT License](./LICENSE).
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<yjs@dbis.rwth-aachen.de>
 | 
					<yjs@dbis.rwth-aachen.de>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ShareJs]: https://github.com/share/ShareJS
 | 
					 | 
				
			||||||
[OpenCoweb]: https://github.com/opencoweb/coweb/wiki
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,6 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "name": "yjs",
 | 
					  "name": "yjs",
 | 
				
			||||||
  "version": "12.0.4",
 | 
					  "version": "12.1.0",
 | 
				
			||||||
  "homepage": "y-js.org",
 | 
					  "homepage": "y-js.org",
 | 
				
			||||||
  "authors": [
 | 
					  "authors": [
 | 
				
			||||||
    "Kevin Jahns <kevin.jahns@rwth-aachen.de>"
 | 
					    "Kevin Jahns <kevin.jahns@rwth-aachen.de>"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user