How nextcloud/text works
Nextcloud Text is a Nextcloud document editor for Markdown and plaintext, with rich-text editing, collaboration, attachments, and workspace support. The typical workflow opens a cloud file or direct-editing session, initializes an editor, synchronizes collaborative changes, and saves Markdown/document state. Routes document session, sharing, workspace, attachment, settings, user, and AI capabilities. The sampled source confirms client save/sync service coordination, session persistence, workspace lookup, and attachment handling; other route targets are represented at their documented paths because their implementations were not sampled.
Main entry points: routes.php API routes · CollaborativeEditorApp-QGJSr8kx.chunk.mjs Collaborative editor · SessionService.php Session service · SessionController.php Session endpoints
Components 25
Editor client
- Editor entry
src/main.js - Collaborative editor
js/CollaborativeEditorApp-QGJSr8kx.chunk.mjs - Markdown editor
js/MarkdownContentEditorApp-H-Rnf-6U.chunk.mjs - Document viewer
js/text-viewer.mjs - Save coordination
src/composables/useSaveService.ts - Sync coordination
src/composables/useSyncService.ts - Search plugin
src/plugins/searchQuery.js
Nextcloud application
- API routes
appinfo/routes.php - Workspace API
lib/Controller/WorkspaceController.php - Attachment API
lib/Controller/AttachmentController.php - App integration
lib/AppInfo/Application.php - Session endpoints
lib/Controller/SessionController.php - Public sessions
lib/Controller/PublicSessionController.php - Settings API
lib/Controller/SettingsController.php - User API
lib/Controller/UserApiController.php - AI tagging
lib/Controller/AiController.php
Collaboration state
- Session service
lib/Service/SessionService.php - Session records
lib/Db/SessionMapper.php - Token cache
Content features
- Markdown content
js/MarkdownContentEditor-sbCy-VvH.chunk.mjs - Plain text
js/PlainTextReader-G7bI_M4x.chunk.mjs - Content comparison
js/MarkdownContentComparison-BSLwS6Ll.chunk.mjs
Other components
- User or app
- Nextcloud files
- Collaborators
Connections 30
- User or app → Editor entry: opens editor
- Editor entry → Collaborative editor: mounts view
- User or app → Markdown editor: uses editor
- User or app → Document viewer: views file
- Collaborative editor → Sync coordination: provides sync
- Collaborative editor → Save coordination: provides save
- Collaborative editor → Search plugin: queries text
- Save coordination → Sync coordination: listens events
- Save coordination → Session endpoints: saves document
- Sync coordination → Session endpoints: syncs changes
- Collaborative editor → Attachment API: loads attachments
- Collaborative editor → Workspace API: opens workspace
- Workspace API → Nextcloud files: reads files
- Attachment API → Nextcloud files: reads writes
- API routes → Workspace API: dispatches workspace
- API routes → Attachment API: dispatches attachments
- API routes → Session endpoints: dispatches sessions
- API routes → Public sessions: dispatches public
- API routes → Settings API: dispatches settings
- API routes → User API: dispatches users
- API routes → AI tagging: dispatches tagging
- Session endpoints → Session service: manages sessions
- Public sessions → Session service: manages sessions
- Session service → Session records: reads writes
- Session service → Token cache: caches tokens
- Collaborators → Public sessions: joins session
- App integration → Nextcloud files: registers events
- Markdown editor → Markdown content: edits Markdown
- Document viewer → Plain text: renders text
- Collaborative editor → Content comparison: compares content