mirror of
https://github.com/yjs/yjs.git
synced 2025-12-29 00:25:01 +01:00
implemented es6 import utility function (Y.extend(module) === module(Y))
This commit is contained in:
13
README.md
13
README.md
@@ -71,6 +71,19 @@ require('y-text')(Y)
|
||||
// do the same for all modules you want to use
|
||||
```
|
||||
|
||||
### ES6 Syntax
|
||||
```
|
||||
import Y from 'yjs'
|
||||
import yArray from 'y-array'
|
||||
import yWebsocketsClient from 'y-webrtc'
|
||||
import yMemory from 'y-memory'
|
||||
import yArray from 'y-array'
|
||||
import yMap from 'y-map'
|
||||
import yText from 'y-text'
|
||||
// ..
|
||||
Y.extend(yArray, yWebsocketsClient, yMemory, yArray, yMap, yText /*, .. */)
|
||||
```
|
||||
|
||||
# Text editing example
|
||||
Install dependencies
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user