Text documents
Create and edit text documents in a project: folder tree + table listing, rich-text details page, manual versions, images, and import/export.
Route pattern: /web/{locale}/text_document/listing?project_id=… and /web/{locale}/text_document/details/{id}?project_id=….
Folders
Documents are grouped in a folder tree (like test suites for cases).
| Action | Where |
|---|---|
| Create folder | Tree sidebar on listing |
| Rename / move | Folder context in tree |
| Create document in folder | Select folder, then Create |
Root-level documents are allowed when no folder is selected (depends on UI defaults).
Listing
The listing combines folder tree (left) and table (right).
Typical columns:
| Column | Meaning |
|---|---|
| Title | Document title |
| Status | Draft, Published, or Archived |
| Folder | Parent folder |
| Author | Creator |
| Created / Updated | Timestamps |
You can filter and sort like other project entities. Status is editable inline when the column allows edit.
Document statuses
| Status | Typical use |
|---|---|
| Draft | Work in progress, not finalized |
| Published | Approved / visible for readers in the project |
| Archived | Closed, kept for history |
Status reflects document lifecycle in the project. It is independent of public link moderation (see Public sharing).
Create a document
- Open Documents for the project.
- Select a folder (optional).
- Click Create.
- The system creates a row with status Draft and initializes an empty HTML body in storage.
- You are redirected to details to edit.
Details page
Metadata (pivot)
Editable fields include Title, Status, Folder, and read-only Author / dates. Changes save through the same property-update flow as other entities.
Editor (CKEditor 4)
Full-screen mode via Maximize on the CKEditor 4 toolbar. Toolbar and allowed HTML tags are defined in the application configuration (aligned with file storage security rules).
Supported formatting (MVP):
- Headings 1–3
- Bold, italic, underline, strikethrough
- Text colour and highlight (when available in toolbar)
- Text alignment
- Bullet and numbered lists
- Links, blockquote, code block, horizontal rule
- Images (see below)
Not in MVP: tables inside the document body.
Autosave (local)
While you edit, content is autosaved to browser local storage keyed by document id. This protects against accidental tab close; it does not create a server version.
Save vs Save version
| Button | Effect |
|---|---|
| Save | Uploads HTML to the current file (overwrites current content, no new history entry) |
| Save version | Creates a new entry in version history (retention max 15) |
After Save version, older versions may be removed automatically when you exceed the limit.
Version history
Open Versions from details:
- List of saved versions with timestamps
- Restore - replaces editor content with a past version (confirm before overwriting unsaved work)
- Retention: keep at most 15 versions per document
Images
Insert images by:
- Toolbar image button
- Paste or drag-and-drop (when supported)
- Image picker - files already attached to the document or project screenshots (e.g. from Utils)
- Manual file UUID (advanced)
Each image is stored in the file service (category screenshot, linked to the document). In HTML the editor uses data-file-uuid for stable references.
| Limit | Value |
|---|---|
| Max images per document | 20 |
If you hit the limit, remove an image from the body or replace one before adding more.
Import and export
Export (from details dialog):
- HTML
- Markdown
- Plain text
Import replaces the entire editor content with the imported file (HTML or Markdown). Review before Save or Save version.
Lifecycle actions
| Action | Where |
|---|---|
| Create | Listing |
| Edit body + metadata | Details |
| Save / Save version | Details toolbar |
| Versions / Restore | Versions dialog |
| Import / Export | Import/export dialog |
| Delete | Listing or details (same pattern as other entities) |
| Public link | Public sharing |
Behaviour notes
- Body load - opening details loads HTML from the file service via the Main App bridge (
load bodyAPI). - Large documents - very large HTML may slow the editor; keep images as files, not inline base64.
- Concurrent edit - last save wins; no real-time co-editing in MVP.
- Permissions - all project members can edit in MVP; role-based restrictions are planned later.
See also
- Documents overview
- Public sharing
- Files and temporary links - how file storage works
- Screenshot Multi - project screenshots usable in image picker
| Version | 1.3.0 |
| Last updated | 2026-07-04 |