Skip to content
Merged
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
32 changes: 0 additions & 32 deletions docs/eln/admin/text_template.mdx

This file was deleted.

11 changes: 11 additions & 0 deletions docs/eln/admin/user_management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ An account can be frozen by deactivating it here. Login to this account is then
If the user is currently logged-in, its session will be invalidated.
The data shared by the user to other users is still accessible to them.

:::info
This feature is available starting from version 4.0.
:::
## Global Text Template Editor Rights

Every user can create personal templates without any special permission. If you want someone to also be able to create or edit global templates, you need to give them the `Global Text Template Editor` privilege from this page.

![global-template-editor-button](@site/static/img/admin_ui/text_template/global_template_editor_button.png)

Everyone can see the **Global** tab and browse global templates through My Templates page. This privilege only unlocks the ability to add, edit, or delete them.

## User Quota

The **Disk Usage** column shows how much storage a user is allowed to use
Expand Down
47 changes: 47 additions & 0 deletions docs/eln/ui/my_templates.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: My Templates
---

import { faTrashAlt, faCog } from "@fortawesome/free-solid-svg-icons";
import { Btn } from "@site/src/js/btn.js";

:::info
This feature is available starting from version 4.0.
:::

My Templates is where you manage reusable text snippets for editors throughout the ELN.
Everyone can create personal templates. Global templates are visible to everyone and editable only by users with the [Global Template Editor](../admin/user_management#global-text-template-editor-rights) privilege.

## Opening My Templates

Click **My Templates** inside the <Btn mixed={[faCog]} color={"secondary"}/> toolbar settings popover from a text editor. It opens in the same tab. When you're done, hit **Back** to return to the editor — your toolbar picks up the changes straight away, no reload needed.

![My Templates page screenshot](/img/text_templates/my-template.png)


The page has two tabs:

- **Personal (My)** — your own templates, only visible to you
- **Global** — shared templates visible to everyone; you can edit them only if you have [Global Template Editor](../admin/user_management#global-text-template-editor-rights) rights

## Creating a template

1. Click **New**.
2. Give it a **Name** — this is what shows up in the MT dropdown.
3. Optionally add a **Short Label** (shown as text on the toolbar button) and an **Icon Class** to give it an icon. Icons can come from [Font Awesome](https://fontawesome.com/v4/icons/), or the internal Chemotion ELN icon libraries. Search those libraries for a class name that matches the icon you want. For example:
- a thermometer: `fa fa-thermometer-quarter`
- a tube: `icon-residue-adsorbed`
4. Write the content in the editor.
5. Click **Save Template**.

The icon shows when the template is pinned directly to the toolbar. When it is added to a dropdown menu, the text label is shown instead.

If a template with that name already exists, you'll see an error and nothing will be saved.

## Editing a template

Pick a template from the list on the left, make your changes, and click **Update Template**.

## Deleting a template

Click the <Btn mixed={[faTrashAlt]} color={"danger"}/> button next to it in the list.
30 changes: 20 additions & 10 deletions docs/eln/ui/text_editor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,41 @@
title: Text Editor
---

import { faPlus, faTrashAlt } from "@fortawesome/free-solid-svg-icons";
import { faTrashAlt } from "@fortawesome/free-solid-svg-icons";
import { Btn } from "@site/src/js/btn.js";

Throughout the ELN, you can work with text editors in many different contexts.
`Text templates` are meant to help you write by providing ready-made paragraphs that can be inserted in many text editors. They can be configured by an admin in the [admin panel](../admin/text_template).
Text editors appear throughout the ELN and text templates let you insert ready-made paragraphs with a single click — handy for content you write repeatedly.
Everyone can create their own personal templates. Global templates (shared across the whole ELN) can be viewed by anyone and edited by users with the [Global Template Editor](../admin/user_management#global-text-template-editor-rights) privilege.

![](/img/20231013_customTextblocks.png)

**Formatting utilities**: standard utilities for formatting text (like in Word)
**User-defined custom text templates:** icons of predefined `text templates`
**Configuration text templates**: Pop-up menu for configuration of `text templates` in editor
**Formatting utilities**: standard text formatting (bold, italic, lists, etc.).<br />
**User-defined custom text templates:** icons or dropdown menus for your templates or global templates.<br />
**Configuration**: pop-up menu to configure `text templates` in the editor.

## Using and customizing icons

You can use predefined text templates if your cursor is active in the editor.
By clicking on an icon the `text template` content will appear at your cursor.
You can use predefined templates and your own templates when your cursor is active in the editor.
Click an icon to insert the `text template` content at the cursor position.

The following video shows you how to customize your toolbar:

![text_template_editor](/img/20231013_configTextTemplatesIcon.gif)

## Using and customizing templates dropdown menus

In addition you can organize your templates in dropdown menus:
You can also group templates into dropdown menus instead of individual icons:

![text_template_editor](/img/20231013_configTextTemplatesDropDown.gif)

You can remove all elements by clicking <Btn mixed={[faTrashAlt]} color={"danger"}/>
Click <Btn mixed={[faTrashAlt]} color={"danger"}/> to remove any item from the toolbar or dropdown.

:::info
This feature is available starting from version 4.0.
:::
## My Templates

The **MT dropdown** in the toolbar can show predefined templates as well as your personal templates and new global templates. Open the toolbar settings menu and click [My Templates](./my_templates) to manage the templates that appear there.

![MT dropdown](/img/text_templates/mt-dropdown.png)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/text_templates/mt-dropdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/text_templates/my-template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.