Need help setting up realtime

Hey folks, I am making a docs builder webapp and currently making realtime editing, but per block not per character. My issue is, im storing content of each page as a JSONB, and i am not sure how would i go on about with it, since i know you cant check realtime for JSONB properties, i want to know how to solve this? Here is the table for where i store the content:
create table public.pages (
  id uuid not null default gen_random_uuid (),
  created_at timestamp with time zone not null default now(),
  updated_at timestamp with time zone not null default now(),
  project_id uuid not null,
  section_id uuid not null,
  parent_page_id uuid null,
  title text not null default 'Untitled'::text,
  slug text not null,
  icon text null default 'FileText'::text,
  created_by uuid not null,
  last_edited_by uuid null,
  content jsonb not null default '[{"id": "Header 1-1", "type": "Header 1", "level": 1, "title": "Main Heading", "subtitle": "Subtitle for main heading", "createdAt": 1759941339328}]'::jsonb,
  position integer not null default 0,

  -- you can ignore stuff from here
  constraint pages_pkey primary key (id),
  constraint pages_project_section_slug_unique unique (project_id, section_id, slug, parent_page_id),
  constraint pages_last_edited_by_fkey foreign KEY (last_edited_by) references users (user_id) on delete set null,
  constraint pages_parent_page_id_fkey foreign KEY (parent_page_id) references pages (id) on delete CASCADE,
  constraint pages_created_by_fkey foreign KEY (created_by) references users (user_id) on delete RESTRICT,
  constraint pages_project_id_fkey foreign KEY (project_id) references projects (id) on delete CASCADE,
  constraint pages_section_id_fkey foreign KEY (section_id) references sections (id) on delete CASCADE
) TABLESPACE pg_default;
Was this page helpful?