# Creating and attaching the Content artifact

## Creating the Content artifact

A new **Content (TextContent)** we create in the content editor (more in [Content Editor](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/4-tresci/tresc-textcontent/edytor-tresci)).

{% stepper %}
{% step %}

#### Artifact creation

Go to the module **Library**, and then to the tab **Content**. Click the **Add content**.\
In the dialog box that appears, set the name and location of the artifact. Clicking the **Add content** button will open the content editor.
{% endstep %}

{% step %}

#### Content Editor - window structure

The editor window is divided into sections:

* In the main part of the window, we add the content and any HTML styles.
* Below is a preview of the content being created (approximate).
* On the left, you can add additional languages for the content.

![Figure 1. Content Editor - creating content](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/PGFc2mtwcboWcxdu1nqs/26k_files/Zaznaczenie_101.png)
{% endstep %}
{% endstepper %}

## Adding a new language

Each **Content** (TextContent) can consist of versions in different languages. At least one is required. To add another language version, click the **Add translation** button in the lower-left corner of the editor. A new panel marking the language version will appear on the left. In the field **TRANSLATION NAME** enter the language code (according to ISO 639), and on the right in the upper panel enter the content.

![Figure 2. Adding a new language in content translations](https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/pM5sF0UbpSe1k84AeQ6T/26k_files/image2022-12-19_14-42-45.png)

## HTML and Wiki Markup formatting

The content of the artifact can be saved using one of two languages:

* HTML (scripts in content are not supported by the platform),
* Wiki Markup (see: [Confluence Wiki Markup](https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup) and [sample formatting page](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/4-tresci/tresc-textcontent/tresc-przy-pomocy-wiki-markup)). Note: tables are supported only in the simplest version ([a plain table with a header at the top](https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup#ConfluenceWikiMarkup-Tables)).

The default formatting method is HTML. To set Wiki Markup, in the XML source (where the Content is attached), add the configuration for TextContent in OutputFields: localName="markupType" serviceName="markupType".

## Preview of the created Content

After entering text in the upper part of the window, the lower panel will show an approximate appearance of it (the preview is for reference only — it is not an exact representation of the artifact in the application).

{% hint style="info" %}
Auto-formatting:

* "Orphans" and single-letter words (e.g. "and", "in", "from") will be automatically moved to a new line.
* Large numbers will not be split onto a new line (e.g. "1 000 000 000").

This eliminates the need to use non-breaking spaces — the text dynamically adjusts to the window size.
{% endhint %}

## Using the artifact in components

The created **Content** (TextContent) is most often used in the following components in the application:

* [Formatted content - TextContent](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/4-tresci/tresc-formatowana-textcontent)
* [Formatted (collapsible) content - RollableTextContent](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/4-tresci/tresc-formatowana-zwijana-rollabletextcontent)
* [Declarations - Statements](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/7-komponenty-specjalne/oswiadczenia-statements)
* [Radio group - RadioGroup](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/2-pola-wyboru/radio/radio-grupa-radiogroup)

### Attaching the artifact in the Formatted Content component

The method of attaching the artifact depends on the component in which you want to use the Content. An example of use in the most commonly used component — **Formatted content** — is described in: [Attaching and editing Content from the application form](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/4-tresci/tresc-textcontent/podpiecie-i-edycja-tresci-z-poziomu-wniosku).

Additional resources:

* [WCAG best practices for low-code dev — HTML-Contents (TextContents) and custom components (CustomComponents)](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/wcag/dobre-praktyki-wcag-ogolne-low-code)
