Rich Text Editor
The rich text editor is used wherever a Rich Text attribute is entered: on create and edit forms, in the attribute's Default Value in Admin, and in the Rich Text standard widget in Design Studio. This page describes everything the editor provides and how rich text is displayed elsewhere in the application.
For when to use a Rich Text attribute, see Text and Rich Text.
Toolbar
The toolbar sits above the editing area. Its controls, from left to right:
| Control | What it does |
|---|---|
| Font size | Sets the size of the selected text: Small, Normal, Large or Huge. The list shows the size at the cursor. |
| Bold | Makes the selected text bold. |
| Italic | Makes the selected text italic. |
| Underline | Underlines the selected text. |
| Link | Adds, changes or removes a link. See Links. |
| Ordered List | Turns the selected lines into a numbered list, or back into paragraphs. |
| Bullet List | Turns the selected lines into a bulleted list, or back into paragraphs. |
| Image | Inserts one or more image files from your computer. See Images. |
| Video | Inserts a link to a video. See Videos. |
| Clean | Removes all formatting from the selection: sizes, bold, italic, underline, colours, links, lists, checklists, headings, alignment and indentation. Images are kept. |
Bold, Italic, Underline, Link and the list buttons are highlighted when the cursor is inside text that already has that formatting. Hovering a control shows its name in the user's language.
When the field is read-only, the toolbar is hidden and the content cannot be changed.
Typing
Text is stored exactly as it is typed. The editor does not replace quotes, dashes, arrows or fractions with symbols, and it does not turn Markdown such as # Title, > quote or **bold** into formatting. A web address that is typed is kept as plain text; use Link to make it a link.
A few prefixes, typed at the start of an empty line, start a list:
| Type | Result |
|---|---|
1. (or any number followed by . ) | Numbered list, always numbered from 1 |
- or * | Bulleted list |
[ ] | Checklist item |
[x] | Checked checklist item |
Keyboard shortcuts
On macOS, use Cmd instead of Ctrl.
| Keys | Action |
|---|---|
Ctrl+B | Bold |
Ctrl+I | Italic |
Ctrl+U | Underline |
Ctrl+Z | Undo |
Ctrl+Y or Ctrl+Shift+Z | Redo |
Tab | At the start of a list item, or with list items selected: moves the items one level deeper. In a table: moves to the next cell, and adds a row after the last cell. Anywhere else: inserts a tab space. |
Shift+Tab | At the start of a list item, or with list items selected: moves the items one level up. In a table: moves to the previous cell. Anywhere else: moves the focus to the previous field on the form. |
Enter on an empty list item | Ends the list. |
Tab inside the editor never moves the focus to the next field on the form.
Links
Select the text to link and click Link. The Insert Link dialog opens with a URL field.
- Web addresses (
http://,https://), email links (mailto:) and phone links (tel:) are accepted. - An address without a protocol, such as
www.example.com, is saved ashttps://www.example.com, so it never opens a page inside Protrak. - Anything else, including
javascript:links, shows the message Enter a web address, or a mailto: or tel: link, and Apply stays disabled. - If no text is selected, the address itself is inserted as the link text.
- To change a link, place the cursor in it and click Link: the dialog shows the current address. Remove Link removes the link and keeps the text.
Links open in a new browser tab.
Videos
Click Video and enter the video's address in the Insert Video dialog. The video is inserted as a link on its own line. It is not played inside the record.
| Address entered | Saved as |
|---|---|
https://www.youtube.com/watch?v=<id> or https://youtu.be/<id> | https://www.youtube.com/embed/<id>?showinfo=0 |
https://vimeo.com/<id> | https://player.vimeo.com/video/<id>/ |
Any other http:// or https:// address | Unchanged |
Any other input shows the message Enter a video URL starting with http:// or https://, and Insert stays disabled.
Images
Images can be added in three ways:
- Image button: choose one or more image files. Any image format the browser recognises is accepted, for example PNG, JPG, GIF, WebP or HEIC.
- Paste: paste a screenshot or a copied image with
Ctrl+V. - Drag and drop: drag image files from your computer into the text.
Files that are not images, such as PDFs, are ignored.
Images are stored inside the attribute value itself, not as separate attachments. Large images therefore make the record larger; resize or compress them before inserting where possible. In the editor, an image never extends beyond the width of the field.
Pasting from other applications
Content copied from Word, Excel, Outlook or a web page is pasted as formatted text, not as a picture:
- Bold, italic, underline, text and highlight colours, links, lists and tables are kept.
- Font sizes are kept only when they match Small, Large or Huge; other sizes become normal text.
- Fonts other than the standard serif and monospace fonts are removed, so pasted text uses the field's font.
When the copied content contains both text and a picture of it (as Word and Excel provide), the text is pasted.
Formatting that is kept but has no toolbar button
Content that is pasted, or that was saved by an earlier version of the editor, can contain formatting that the toolbar does not offer: text alignment, indentation, text and highlight colours, serif or monospace fonts, subscript and superscript, headings, quotes, code blocks, tables and checklists. This formatting is displayed in view and edit mode and is kept when the record is saved. Clean removes it.
Required values and empty content
A Rich Text attribute is treated as empty when it contains no text: only spaces, only empty lines, or nothing at all. If the attribute is required, the message [field name] is required is shown and the record cannot be saved. Content that contains only an image counts as a value.
Opening a record in edit mode and leaving the rich text unchanged does not mark the record as changed, so Save stays disabled until something is edited.
How rich text is displayed
| Where | How it appears |
|---|---|
| View forms and layouts | The full formatted content. An empty value is shown as -. |
| Grids, tiles, tree views and worksheets | The first 10 characters of the text followed by ..., or the full text if it is shorter. A value with only an image shows an image icon. Hover the cell to see the full formatted content in a tooltip. |
| Worksheets | Read-only; rich text cannot be edited in a cell. |
| Rich Text widgets and help-text tooltips | The full formatted content. |
Rich text is always cleaned before it is displayed: scripts, event handlers and javascript: links are removed, so stored content cannot run code in the browser.
Configuration
- Default value: in Admin, open the attribute under Schema → Attributes and enter the content in Default Value. It uses the same editor, and new records start with this content.
- Hide label: set the attribute's renderer to Show Only Attribute Value (Hide Label) to display the value without its label in view mode. The label is still shown when the record is edited.
- Read-only display: when a user cannot edit the attribute, the value is shown without the editor. If a form uses the Design Studio setting Render read-only editor for All attributes renderers, the editor is shown greyed out without a toolbar instead.
Rich Text standard widget
The Rich Text standard widget places fixed formatted content on a page: instructions, notes, a logo, links or a short guide. An administrator writes the content in Design Studio with the editor described on this page, and every user sees the same content. The widget does not show values from the record; use attribute fields for that.
Where it can be added
| Design Studio | Where to find it |
|---|---|
| Home templates | Standard Widgets → Rich Text in the widget library. See Page Template Editor. |
| Create, Edit and View forms | Standard Widgets → Rich Text in the form library. See Forms. |
| Sticker forms | Standard Widgets → Rich Text. See Sticker Forms. |
Quick Edit forms and relation edit forms do not offer the widget.
Adding and editing the content
- Drag Rich Text from Standard Widgets onto the canvas.
- Select the widget to open its settings. Enter the content in the Content field on a Home template, or in the Rich Text field on a form. The field is the full editor: the same toolbar, typing behaviour, keyboard shortcuts, links, videos, images and pasting as described above.
- Save the template or form. The content is saved with it.
On a Home template, the widget also has the common widget settings: title, border, visibility, position and size.
How it is displayed
- The content is shown read-only, exactly as it was entered, and is cleaned before display like any rich text, so scripts and
javascript:links are removed. - Content written with the previous editor keeps its formatting, as described in Formatting that is kept but has no toolbar button.
- On a sticker, images are scaled down to fit the label and are never enlarged.
Languages
Toolbar names, size names, dialog titles, field labels, buttons and messages follow the user's language. English, French, Japanese and Italian are supported.