Skip to content

yjs Xmlfragment #554

@sandstone991

Description

@sandstone991

Hi,

Thanks for the awesome project.

I have a project with blocks like images, charts, and text. I'm trying to use Titap for text editing.

The schema looks something like this

type Page = {
rows: Row[]
}

type Row = {
blocks: Block[]
}

type Block = {
 type: "text" | "image" ...
 props: any
}

I'm trying to use yjs-prosemirror through tiptap.

The problem I'm facing is it requires a Yjs XMLfragment, which doesn't have a binding currently.

export interface CollaborationOptions {
  /**
   * An initialized Y.js document.
   * @example new Y.Doc()
   */
  document?: Doc | null;

  /**
   * Name of a Y.js fragment, can be changed to sync multiple fields with one Y.js document.
   * @default 'default'
   * @example 'my-custom-field'
   */
  field?: string;

  /**
   * A raw Y.js fragment, can be used instead of `document` and `field`.
   * @example new Y.Doc().getXmlFragment('body')
   */
  fragment?: XmlFragment | null;
}

Do I build something like #536 but for XMLfragments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions