Skip to content

text editor example using SharedTree and Quill #26217

Merged
brrichards merged 10 commits intomicrosoft:mainfrom
brrichards:text-editor-example
Jan 16, 2026
Merged

text editor example using SharedTree and Quill #26217
brrichards merged 10 commits intomicrosoft:mainfrom
brrichards:text-editor-example

Conversation

@brrichards
Copy link
Copy Markdown
Contributor

@brrichards brrichards commented Jan 14, 2026

Summary

  • Add a minimal collaborative text editor example using SharedTree (TextAsTree) and Quill
  • Integrates with the existing Fluid Framework React patterns
  • Includes mocha tests for DOM rendering and view invalidation

Changes

  • New @fluid-example/text-editor package in examples/data-objects/text-editor/
  • Quill 2.x integration for text editing UI
  • TextAsTree for collaborative plain text storage
  • Formatting toolbar disabled with TODO for future character attribute support
  • ESM-compatible test setup with CSS loader hooks for Quill styles

@brrichards brrichards force-pushed the text-editor-example branch 2 times, most recently from 2f0d6c2 to c7e5c98 Compare January 14, 2026 23:19
@brrichards brrichards changed the title simple text editor example using SharedTree and Quill text editor example using SharedTree and Quill Jan 15, 2026
@brrichards brrichards marked this pull request as ready for review January 16, 2026 00:09
@brrichards brrichards requested a review from a team as a code owner January 16, 2026 00:09
Copilot AI review requested due to automatic review settings January 16, 2026 00:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a new collaborative text editor example demonstrating the integration of SharedTree (via TextAsTree) with Quill 2.x editor and React. The example showcases using withMemoizedTreeObservations from @fluidframework/react for automatic re-rendering when the SharedTree changes.

Changes:

  • New @fluid-example/text-editor package with Quill 2.x integration for collaborative plain text editing
  • ESM-compatible test setup with mocha hooks for JSDOM initialization required by Quill
  • Comprehensive test coverage including surrogate pair (emoji) handling

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pnpm-lock.yaml Added dependencies for Quill 2.x and related packages; includes extraneous time: {} entry at end
examples/data-objects/text-editor/package.json Package manifest for new text-editor example with dependencies and scripts
examples/data-objects/text-editor/src/index.ts Entry point connecting TextEditorFactory with ContainerViewRuntimeFactory
examples/data-objects/text-editor/src/schema.ts Schema configuration using TextAsTree from internal SharedTree API
examples/data-objects/text-editor/src/textEditorFactory.ts Factory using treeDataObjectInternal to create TextAsTree instances
examples/data-objects/text-editor/src/quillView.tsx React component integrating Quill editor with SharedTree using withMemoizedTreeObservations
examples/data-objects/text-editor/src/test/textEditor.test.tsx Test suite covering DOM rendering, mutations, and surrogate pair handling
examples/data-objects/text-editor/src/test/mochaHooks.mjs JSDOM setup hook required before Quill import
examples/data-objects/text-editor/.mocharc.cjs Mocha configuration with JSDOM preload hook
examples/data-objects/text-editor/webpack.config.cjs Webpack configuration for building the example
examples/data-objects/text-editor/tsconfig.json TypeScript configuration with React types
examples/data-objects/text-editor/src/test/tsconfig.json TypeScript test configuration
examples/data-objects/text-editor/eslint.config.mts ESLint configuration with React-specific rules
examples/data-objects/text-editor/biome.jsonc Biome formatter configuration
examples/data-objects/text-editor/README.md Documentation for the example
examples/data-objects/text-editor/LICENSE MIT license file
examples/data-objects/text-editor/.npmignore npm package exclusions
examples/data-objects/text-editor/.gitignore Git exclusions
PACKAGES.md Updated package list to include new text-editor example
.changeset/happy-pens-clap.md Changeset describing the new feature
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@github-actions
Copy link
Copy Markdown
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  248787 links
    1796 destination URLs
    2036 URLs ignored
       0 warnings
       0 errors


@brrichards brrichards merged commit a7abfac into microsoft:main Jan 16, 2026
33 checks passed
CraigMacomber added a commit that referenced this pull request Jan 20, 2026
## Description

Minimal prototype for formatted text with inline objects.
This is targeting matching what Quill needs for formatting, see
#26217
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants