Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin text templates #255

Merged
merged 7 commits into from
Oct 17, 2023
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
24 changes: 24 additions & 0 deletions docs/eln/admin/text_template.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Text Template
---

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

Throughout the ELN, users work with text editors in many different contexts.
Text template are meant to help users with writing by providing ready-made paragraphs that can be inserted in any text editor.
Users can insert a template by clicking on the corresponding icon on top of the text editors.

Click on `Text Templates` in the sidebar of the administrator interface in order to
open an editor that lets you configure custom text template:

![text_template_editor](/img/admin_ui/text_template_editor.png)

Click on the <Btn mixed={[faPlus]} color={"primary"}/> button to generate a new `text template`.
You can then configure an icon ([Font Awesome](https://fontawesome.com/),[Bootstrap glyphicons](https://getbootstrap.com/docs/3.3/components/) or internal chemotion eln icons), a `Text` , as well as a the paragraph that's meant to appear as a template in the users' text editors.

The icon will appear in the header of the editor, the text entry in a user definable dropdown menu.

![text_template_edited](/img/admin_ui/text_template_edited.png)

Remove a template by clicking the <Btn mixed={[faTrashAlt]} color={"danger"}/> button next to a template in the list on the left.
32 changes: 32 additions & 0 deletions docs/eln/ui/text_editor.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Text Editor
---

import { faPlus, 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).

![](/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

## 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.

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:

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

You can remove all elements by clicking <Btn mixed={[faTrashAlt]} color={"danger"}/>
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/20231013_configTextTemplatesIcon.gif
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/20231013_customTextblocks.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/admin_ui/text_template_edited.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/admin_ui/text_template_editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.