quillEditor.getContents() in y-websocket back-end

I need to save only the content of the editor in the backend, not the complete yDoc. how can i get quillEditor.getContents() from yDoc?

utils.setPersistence({…
writeState…})