An experimental implementation of how to take the open source ProseMirror rich text editor and enable real-time coauthoring using the Fluid Framework.
Complete these steps to run the example:
- Run
corepack enableto enable Corepack. - From the
FluidFrameworkroot directory, runpnpm install. - From the
FluidFrameworkroot directory, runpnpm run build:fast --nolint.- To build only this package, add the package name to the command:
pnpm run build:fast --nolint @fluid-example/prosemirror
- To build only this package, add the package name to the command:
- Run
pnpm startfrom this directory. - Open http://localhost:8080 in a web browser.
To run the example with SharePoint, complete these steps:
- Follow the webpack-fluid-loader instructions to get authentication credentials.
- Run
pnpm start:spoorpnpm start:spo-dffrom this directory. - Open http://localhost:8080 in a web browser.
ProseMirror uses the following distributed data structures:
- SharedDirectory - root
- SharedString - storing ProseMirror text
This implementation stores the HTML output of the ProseMirror editor onto the SharedString. While this enables collaboration it does not provide for a complete editor. Because rich editing features (ex. bold/italic) are stored as HTML tags along with the text this can cause conflicts with multiple users applying conflicting styles resulting in lost opening/closure tags.
A more complete solution would use the SharedString property bag to apply styles across text ranges. This allows for styles to be merged in a more deterministic way.
You can contribute to Fluid Framework in these ways:
- Answer questions in GitHub Discussions.
- Submit bug reports and help verify fixes.
- Review source code changes.
- Contribute bug fixes.
For detailed instructions, read the repo documentation.
This project follows the Microsoft Open Source Code of Conduct. For more information, read the Code of Conduct frequently asked questions. For questions or comments, contact opencode@microsoft.com.
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services. Use of these trademarks or logos must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Read the Fluid Framework documentation for information about Fluid Framework concepts and APIs.
To request information that the documentation does not contain, create an issue.
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
Use of these trademarks or logos must follow Microsoft's Trademark & Brand Guidelines.
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.