Compare commits
3 Commits
v13.0.0-87
...
v13.0.0-88
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a990963d9 | ||
|
|
7e7c9d5b11 | ||
|
|
775f6eed1d |
@@ -86,9 +86,7 @@ import { WebsocketProvider } from 'y-websocket'
|
|||||||
import { TextareaBinding } from 'y-textarea'
|
import { TextareaBinding } from 'y-textarea'
|
||||||
|
|
||||||
const doc = Y.Doc()
|
const doc = Y.Doc()
|
||||||
const provider = new WebsocketProvider('http://localhost:1234', 'roomname')
|
const provider = new WebsocketProvider('ws://localhost:1234', 'roomname', doc)
|
||||||
// sync all document updates through the websocket connection
|
|
||||||
provider.sync('doc')
|
|
||||||
|
|
||||||
// Define a shared type on the document.
|
// Define a shared type on the document.
|
||||||
const ytext = doc.getText('my resume')
|
const ytext = doc.getText('my resume')
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.0-87",
|
"version": "13.0.0-88",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.0-87",
|
"version": "13.0.0-88",
|
||||||
"description": "Shared Editing Library",
|
"description": "Shared Editing Library",
|
||||||
"main": "./dist/yjs.js",
|
"main": "./dist/yjs.js",
|
||||||
"module": "./dist/yjs.mjs",
|
"module": "./dist/yjs.mjs",
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ export class ContentType {
|
|||||||
* @param {AbstractType<YEvent>} type
|
* @param {AbstractType<YEvent>} type
|
||||||
*/
|
*/
|
||||||
constructor (type) {
|
constructor (type) {
|
||||||
|
/**
|
||||||
|
* @type {AbstractType<any>}
|
||||||
|
*/
|
||||||
this.type = type
|
this.type = type
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -138,6 +138,9 @@ export class Item extends AbstractStruct {
|
|||||||
* @type {Item | null}
|
* @type {Item | null}
|
||||||
*/
|
*/
|
||||||
this.redone = null
|
this.redone = null
|
||||||
|
/**
|
||||||
|
* @type {AbstractContent}
|
||||||
|
*/
|
||||||
this.content = content
|
this.content = content
|
||||||
this.length = content.getLength()
|
this.length = content.getLength()
|
||||||
this.countable = content.isCountable()
|
this.countable = content.isCountable()
|
||||||
|
|||||||
Reference in New Issue
Block a user