@@ -26,7 +26,7 @@ function initDeleteTags() {
2626 documentId = this . getAttribute ( 'data-document_id' ) ;
2727
2828 if ( document ) {
29- CoCreate . deleteDocument ( {
29+ CoCreate . crud . deleteDocument ( {
3030 'collection' : collection ,
3131 'document_id' : documentId ,
3232 'metadata' : ''
@@ -483,8 +483,8 @@ const CoCreate = {
483483 if ( ! id ) return ;
484484 if ( CoCreateCrdt . getType ( id ) ) {
485485 let oldData = CoCreateCrdt . getType ( id ) . toString ( ) ;
486- CoCreateCrdt . deleteData ( id , 0 , Math . max ( oldData . length , info . value . length ) ) ;
487- CoCreateCrdt . insertData ( id , 0 , info . value ) ;
486+ CoCreatecrdt . deleteText ( id , 0 , Math . max ( oldData . length , info . value . length ) ) ;
487+ CoCreatecrdt . insertText ( id , 0 , info . value ) ;
488488 } else {
489489 this . updateDocument ( {
490490 collection : info . collection ,
@@ -539,7 +539,7 @@ const CoCreate = {
539539
540540
541541 /*
542- CoCreate.insertDataCrdt ({
542+ CoCreate.crdt.insertText ({
543543 collection: 'module_activities',
544544 document_id: '5e4802ce3ed96d38e71fc7e5',
545545 name: 'name',
@@ -553,7 +553,7 @@ const CoCreate = {
553553 this . validateKeysJson ( info , [ 'collection' , 'document_id' , 'name' , 'value' , 'position' ] ) ;
554554 let id = this . __getYDocId ( info [ 'collection' ] , info [ 'document_id' ] , info [ 'name' ] )
555555 if ( id ) {
556- CoCreateCrdt . insertData ( id , info [ 'position' ] , info [ 'value' ] , info [ 'attributes' ] ) ;
556+ CoCreatecrdt . insertText ( id , info [ 'position' ] , info [ 'value' ] , info [ 'attributes' ] ) ;
557557 }
558558 }
559559 catch ( e ) {
@@ -563,7 +563,7 @@ const CoCreate = {
563563
564564
565565 /*
566- CoCreate.deleteDataCrdt ({
566+ CoCreate.crdt.deleteText ({
567567 collection: 'module_activities',
568568 document_id: '5e4802ce3ed96d38e71fc7e5',
569569 name: 'name',
@@ -576,7 +576,7 @@ const CoCreate = {
576576 this . validateKeysJson ( info , [ 'collection' , 'document_id' , 'name' , 'position' , 'length' ] ) ;
577577 let id = this . __getYDocId ( info [ 'collection' ] , info [ 'document_id' ] , info [ 'name' ] )
578578 if ( id ) {
579- CoCreateCrdt . deleteData ( id , info [ 'position' ] , info [ 'length' ] ) ;
579+ CoCreatecrdt . deleteText ( id , info [ 'position' ] , info [ 'length' ] ) ;
580580 }
581581 }
582582 catch ( e ) {
@@ -586,7 +586,7 @@ const CoCreate = {
586586
587587
588588 /*
589- CoCreate.getDataCrdt ({
589+ CoCreate.crdt.getText ({
590590 collection: 'module_activities',
591591 document_id: '5e4802ce3ed96d38e71fc7e5',
592592 name: 'name'
0 commit comments