6 min read #OpenCloud#UX

OpenCloud · Text editor

Text editor for 36 formats

Many files in a shared storage are plain text: notes, minutes, how-tos, configurations. OpenCloud ships an editor for them that edits Markdown with a preview and a toolbar, and other text files as plain text. Between 1.1.0 and 4.1.0 it gained undo and redo for all text files, 27 more file extensions, line numbers, and a README.md that appears above a folder's file list. The editor is part of the open source core and needs no subscription.

Much of what teams store is text without layout: the minutes of the Monday meeting, a checklist for new colleagues, notes from a customer call, a docker-compose.yml or an .env file. Starting an office application for files like these is overkill. Downloading them, editing locally and uploading them again is tedious and creates copies, and later nobody knows which one is current. That's why OpenCloud ships a text editor that runs in the browser and changes files where they are. With 4.1.0 it has matured in several places.

Markdown with preview

Markdown is the format the editor is built for. When you open a file ending in .md or .markdown, the window splits: the text on the left, the formatted preview on the right, updating as you type. Since 3.7.0, a toolbar offers a fixed set of tools: bold, underline, italic, heading, strikethrough, superscript and subscript, quote, bulleted list, numbered list, task list, inline code and code block, link, image and table, plus undo, redo and two toggles for the preview. You don't need to know the Markdown syntax for this; if you do, just type it.

Text editor with Meeting-Notes.md: the toolbar at the top, the Markdown text with line numbers on the left, the formatted preview with heading, agenda, task list and table on the right.

Split window: Markdown text on the left, preview on the right, toolbar above (OpenCloud 4.1.0).

The “New” menu in the file list offers a plain text file and a Markdown file. With read-only access, Markdown files appear as a formatted view without the toolbar. By default, the editor saves changes automatically every two minutes if anything has changed.

  1. Open “New” menu with Folder, Plain text file (txt), Markdown file (md) and Shortcut (url).
    The “New” menu offers “Plain text file” and “Markdown file”.
  2. “Create a new file” dialog with the “File name” field and the suggestion “New file.md”.
    The “Create a new file” dialog then asks for the name (OpenCloud 4.1.0).

The editor has two limitations. Images you insert through the toolbar end up as Base64 data inside the Markdown file, not as separate files in the folder. That keeps everything in one file but makes it large quickly. From 2 MB on, OpenCloud warns before opening that the file exceeds the recommended size for editing. You can continue anyway. Also, the editor is a tool for one person at a time: there is no real-time co-editing like in Collabora.

36 formats

Up to 3.0.0, the editor opened nine extensions: txt, md, markdown, js, json, xml, py, php and yaml. In issue web#839, a user wrote that he also wanted to view and edit a Cargo.toml in the browser, and suggested detecting text files by their content, the way the Linux command file does. The development team rejected content detection, because the server would have to look into the files every time it displays a file list. Instead, web#848 extended the list of extensions. Since 3.1.0 there are 36, including html, css, scss, ts, vue, c, cpp, java, sh, bat, yml, toml, ini, conf, env, csv, tsv, log, ics and rtf.

Text editor with docker-compose.yml as plain text with line numbers, at the top only undo, redo and the hash sign on the right.

A docker-compose.yml opens as plain text with undo and redo (OpenCloud 4.1.0, the password is a placeholder).

Because detection depends on the extension, it has gaps. A file simply named Dockerfile or Makefile has no extension and doesn't open in the editor; the entries dockerfile and makefile only match names like app.dockerfile. RTF files show up as source with all control codes, not as a formatted document.

Context menu of the file Dockerfile: Share, Copy permanent link, Download, Delete, Cut, Copy, Rename, Details, but no “Open”.

“Dockerfile” without an extension: the context menu has no “Open”.

Context menu of the file app.dockerfile with “Open” and “Open with…” at the top.

“app.dockerfile”: here “Open” and “Open with…” are at the top (OpenCloud 4.1.0).

The editor treats all formats except Markdown as plain text, without a preview. Up to 1.1.0, these files had no toolbar at all. web#306 added undo and redo, which is often the most important button for a configuration file. Since 3.7.0, the editor also shows line numbers, in Markdown and plain text alike (web#1449). Error messages usually name a line, and in a 200-line YAML file that saves searching. A toggle with the hash sign in the toolbar hides the numbers (web#1468). They are on by default, and the choice only applies to the open file: the next time you open it, the numbers are back. In the same release, the preview shows lists with bullets and numbers again; they had been missing before.

OpenCloud 3.6.0: services.yaml in the editor without line numbers, only undo and redo at the top.

Before (3.6.0): no line numbers.

OpenCloud 3.7.0: the same services.yaml with line numbers 1 to 13 and the hash-sign toggle at the top right.

After (3.7.0): line numbers in the margin, the “#” toggle to hide them at the top right.

The editor doesn't replace an IDE. It doesn't check syntax, doesn't autocomplete and knows nothing about project structure. For a small change to a configuration, without a terminal and without syncing to your own computer, it does the job.

README.md above the file list

If you browse software on GitHub or GitLab, you know this: when a folder contains a README, it appears below the file list and explains what the folder contains. Since 4.1.0, OpenCloud does the same, only at the top (web#1708). If a folder contains a file named README.md, OpenCloud shows its content formatted above the file list. Upper and lower case don't matter. If the text is taller than 300 pixels, OpenCloud collapses it and offers “Show more”. The display is read-only; to make changes, open the file in the editor.

Offers folder in the Sales space: the formatted README at the top with the heading “Offers”, current template and responsibility, below it the file list with Offer-2024.docx, Offer-2025.docx, Price-list-2025.xlsx and README.md.

The README.md of the “Offers” folder appears formatted above the file list (OpenCloud 4.1.0).

  1. Templates folder with a long README that is cut off after step 3, with “Show more” below.
    If the README is longer, OpenCloud hides the rest and shows “Show more”.
  2. The same README in full with 15 steps, below it “Show less” and the file list.
    Expanded, the whole text is shown, and “Show less” collapses it again (OpenCloud 4.1.0).

This turns a file into a manual for the folder: which offer template is current, who is responsible for the folder, what belongs in the archive. It works in your personal space, in subfolders of project spaces, in shared folders and through public links. At the top level of a project space, the space description appears instead, as before, and it is also written in Markdown. OpenCloud doesn't display other names such as README.txt or readme.markdown.

Top level of the Sales space: the space header with image, name and the description “Offers, price lists and customer templates of the sales team.”, below it the folders Archive, Offers and Templates.

At the top level of the space, the space description appears instead of a README (OpenCloud 4.1.0).

For developers

The three places where OpenCloud shows Markdown, the editor, the space description and the README, use the same TextEditor component from @opencloud-eu/web-pkg. It is built on the open source library md-editor-v3, which in turn uses CodeMirror as its input field. Formulas (KaTeX), Mermaid diagrams and ECharts charts are disabled. The list of extensions is hard-coded in packages/web-app-text-editor/src/index.ts. The app does read the options extraExtensions and primaryExtensions from its configuration, but there is no documented way to set these options for the bundled app. If you're missing an extension, your best bet is to open an issue in the opencloud-eu/web repository, as happened with web#839.

Sources