Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/user/files-and-folders/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ This section covers common day-to-day tasks such as creating and moving content,
- [Delete and restore items from the trash](./delete-restore.md)
Remove files and folders and restore them later if needed.

- [Editing Markdown files](./markdown-editor.md)
Edit `README.md` and other Markdown files directly in OpenCloud with formatting suggestions.
- [Text Editor](./text-editor.md)
Create and edit Markdown files, OpenCloud Notes, and plain text files directly in your browser. Format content and collaborate on documents in real time.

- [README files in folders](./readme-files.md)
Add a `README.md` file to a folder so OpenCloud renders it above the file list.

Expand Down
61 changes: 0 additions & 61 deletions docs/user/files-and-folders/markdown-editor.md

This file was deleted.

162 changes: 162 additions & 0 deletions docs/user/files-and-folders/text-editor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
---
id: text-editor
sidebar_position: 40
title: Text Editor
description: Create, format, collaborate on, and save text documents and notes in OpenCloud.
---

# Using the Text Editor

OpenCloud 8.0 and later includes a Tiptap-based editor for working with supported text files directly in your browser. You can create and format Markdown documents and OpenCloud Notes without installing additional software. With collaborative editing enabled, several people can also work on the same document in real time.

## Create or Open a Document

To create a document:

1. Open the folder or Space where you want to store the document.
2. Select `New`.
3. Select `Note` to create an `.ocnote` file or `Markdown file` to create an `.md` file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just as a heads up: This is correct for the rolling release, but we will not yet include ocnote in the upcoming production release. That means you need to remove all ocnote mentions for the upcoming stable release docs.

4. Enter a file name and confirm the creation.

The new document opens in the text editor.

To open an existing document, select the file in the file list. If the text editor is not the default application for that file, open its context menu and select `Open with...` and then `Text Editor`.

<img src={require("./img/text-editor/editor-overview.png").default} alt="OpenCloud text editor showing a formatted Markdown document" width="1920"/>

:::note
You need permission to edit the file. If you only have view permission, you can follow changes made by others but cannot change the document.
:::

## Choose a File Format

Choose the format based on how you want to use the document.

| Format | Use it for | Formatting |
| :------------------------- | :------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------- |
| Markdown (`.md`) | Portable documents that you also want to use with external Markdown tools | Headings, emphasis, lists, quotes, links, images, tables, and code |
| OpenCloud Note (`.ocnote`) | Rich notes that you primarily edit in OpenCloud | Markdown-style features plus font size, text and background colors, line height, alignment, underline, subscript, and superscript |
| Plain text (`.txt`) | Unformatted text, logs, or simple notes | Plain text without rich formatting; search, replace, and printing remain available |

An `.ocnote` file is an OpenCloud rich-text format stored as text-based JSON. It is not a standard Markdown format.
Comment on lines +38 to +41

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here - please remember to remove ocnote in the upcoming stable release docs.

For Plain text, it's the other way around though: the upcoming stable release will include Plain text in the "New"-menu, but not the rolling release. So I'd remove it here since it's the rolling release docs. And re-add it later in the PR for the stable release while removing ocnote.


<img src={require("./img/text-editor/note-formatting.png").default} alt="OpenCloud Note with rich text formatting and the text color menu open" width="1920"/>

## Format Your Content

Use the formatting toolbar to undo or redo changes, format text, create lists, and insert content. In narrow windows, actions that do not fit move into `More actions`.

<img src={require("./img/text-editor/formatting-toolbar.png").default} alt="Formatting toolbar in the OpenCloud text editor" width="1505"/>

To format existing text:

1. Select the text or place the cursor in the block you want to change.
2. Use `Turn into` to choose a paragraph, heading, quote, or code block.
3. Use the toolbar actions for bold, italic, strikethrough, or a list as needed.

### Use the Slash Menu

Type `/` at the beginning of a line to open the slash menu. Start typing the name of an action to filter the menu, then select an item such as a heading, list, quote, code block, link, image, or table.

<img src={require("./img/text-editor/slash-menu.png").default} alt="Slash menu with formatting and insertion actions" width="900"/>

When you hover next to a content block, use `Add content` to insert a block after it. On a desktop device, use `Drag to move` to rearrange blocks.

### Insert a Link

1. Select the text that should become a link, or place the cursor where you want to add one.
2. Select `Link` in the toolbar or slash menu.
3. Enter the destination URL and link text.

<img src={require("./img/text-editor/insert-link.png").default} alt="Link editor with fields for the URL and link text" width="900"/>

### Insert Code

Use `Inline code` for code within a sentence. For multiple lines, select `Code block` from `Turn into` or the slash menu. The editor highlights supported languages, detects the language when possible, and also lets you choose a language.

<img src={require("./img/text-editor/code-block.png").default} alt="Code block with syntax highlighting and a language selector" width="900"/>

## Insert Images and Tables

### Insert an Image

1. Place the cursor where you want the image.
2. Open `Insert image` in the toolbar, or type `/image`.
3. Choose one of the available options:
- `Image from file` uploads an image from your device.
- `Image from URL` inserts an image from an `http://` or `https://` address.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd not specifically mention http:// here, most of the internet is https:// nowadays. But maybe add that the image needs to be publicly available.

Suggested change
- `Image from URL` inserts an image from an `http://` or `https://` address.
- `Image from URL` inserts an image from an address that is publicly available.

- `Insert from cloud` selects an image already stored in OpenCloud. This option is not available from a public link.
4. After insertion, select the image and use its resize handles to adjust its size.

<img src={require("./img/text-editor/insert-image.png").default} alt="Slash menu showing the supported image insertion options" width="900"/>

### Insert a Table

1. Place the cursor where you want the table.
2. Select `Create a table` in the toolbar or slash menu.
3. Choose the required number of rows and columns.
4. Select a cell to open the table controls.

The table controls let you add or remove rows and columns, toggle the header row, or delete the table.

<img src={require("./img/text-editor/insert-table.png").default} alt="Table inserted into a document" width="900"/>

## Find and Navigate Content

### Find and Replace Text

Open `Search and replace` from the toolbar, or press `Ctrl + F` (`Cmd + F` on macOS). Enter the text to find and, if needed, replacement text. You can match the letter case or whole words only.

<img src={require("./img/text-editor/find-replace.png").default} alt="Find and replace interface in the OpenCloud text editor" width="1920"/>

### Navigate with the Table of Contents

Markdown and `.ocnote` documents provide a table of contents generated from their headings. Open the `Outlines` panel to see the document structure. Select a heading to jump to it; the active entry follows your position as you scroll and the list updates when headings change.

<img src={require("./img/text-editor/table-of-contents.png").default} alt="Markdown document with the Outlines table of contents open" width="1920"/>

## Collaborate on Documents

Real-time collaboration is available for Markdown and `.ocnote` files. When several users open the same document, changes appear in their editors immediately. The toolbar shows active participants, and colored cursors indicate where they are working.

Users with edit permission can change the document. Users with view permission can follow the session without seeing editing controls.

<img src={require("./img/text-editor/collaboration.png").default} alt="Markdown document with two active participants and Margaret Hamilton's cursor" width="1920"/>

### Mention Another User

In a Markdown or `.ocnote` document, type `@` and select a user from the suggestion list. Only users who can access the document are offered. The mention notification is sent after the document is saved and follows the configured notification settings.

Mentions are not available through public links.

<img src={require("./img/text-editor/mentions.png").default} alt="Mention suggestion menu showing Margaret Hamilton" width="1920"/>

:::note
Real-time collaboration requires the Yjs service. Administrators can find deployment details in [Collaborative Editing with the Yjs Server](../../admin/configuration/collaborative-editing.md).
:::

Collaboration has the following limitations:

- Public links do not join a collaborative session. A user with write access can still edit and save, but changes do not appear in other open editors in real time.
- Collaborative editing is disabled for files in end-to-end encrypted vaults.
- Source mode is read-only while collaboration is active because source changes cannot be merged into the shared document.

## Save Your Changes

Changes in the editor and changes saved to the file are separate:

- During a collaborative session, your edits synchronize with the other participants immediately.
- The file is updated when a participant selects `Save`, presses `Ctrl + S` (`Cmd + S` on macOS), or periodic autosave runs.
- The autosave interval is configured by the administrator and is shown in the editor when autosave is enabled.

If another application, such as a desktop sync client, changes the file while it is open, OpenCloud notifies the editor immediately. If you have no unsaved changes, the editor loads the newer file. If you have unsaved work, keep it by selecting `Save as`, or reload the page to discard it and open the external version.

Each successful save updates the regular OpenCloud file. Previous states are therefore available according to the normal [file versioning](./versions.md) rules.

## Good to Know

- Markdown files remain compatible with external Markdown editors, although rendering details can differ between applications.
- `.ocnote` preserves rich formatting that Markdown cannot represent and is intended for use with OpenCloud's editor.
- Code blocks provide syntax highlighting for common programming and configuration languages.
- Select `Print` to open the system print dialog. Depending on your operating system, the dialog may also offer `Save as PDF`; this creates a local file and does not save a PDF in OpenCloud.
- To display a `README.md` above a folder's file list, see [README Files in Folders](./readme-files.md).
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Dieser Abschnitt behandelt typische Aufgaben wie Inhalte erstellen und verschieb
- [Elemente löschen und aus dem Papierkorb wiederherstellen](./delete-restore.md)
Entfernen Sie Dateien und Ordner und stellen Sie sie bei Bedarf später wieder her.

- [Markdown-Dateien bearbeiten](./markdown-editor.md)
Bearbeiten Sie `README.md` und andere Markdown-Dateien direkt in OpenCloud mit Formatierungshilfen.
- [Texteditor](./text-editor.md)
Erstellen und bearbeiten Sie Markdown-Dateien, OpenCloud-Notizen und unformatierte Textdateien direkt im Browser. Formatieren Sie Inhalte und arbeiten Sie in Echtzeit gemeinsam an Dokumenten.

- [README-Dateien in Ordnern](./readme-files.md)
Fügen Sie einem Ordner eine `README.md`-Datei hinzu, damit OpenCloud sie oberhalb der Dateiliste rendert.
Expand Down

This file was deleted.

Loading
Loading