> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# String: Strip HTML tags

> Removes the HTML tags from a string. A set of tags can be supplied to be excluded.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Removes the HTML tags from a text value and keeps only the readable content. Use this when a source system stores a description with markup but the target system expects plain text. You can optionally keep a few tags, for example to preserve basic formatting such as bold or links.

This documentation describes: [Schema](/schemas/mapper/string-strip-html)

## Fields

<FormField property="excludeTags" label="Exclude tags">
  The tags that should be kept instead of removed. Write them one after another in their bracketed form, for example `<strong>` to keep bold text, or `<p><a>` to keep paragraphs and links. Leave this empty to remove every tag.
</FormField>

## Sample data

With Exclude tags left empty, every tag is removed and only the text remains.

| Field        | Value   |
| ------------ | ------- |
| Exclude tags | (empty) |

Input:

```json theme={null}
{ "description": "<p>Soft <strong>wool</strong> scarf</p>" }
```

Output:

```json theme={null}
{ "description": "Soft wool scarf" }
```

With Exclude tags set to `<strong>`, the listed tags are kept in place while the rest are removed.

| Field        | Value      |
| ------------ | ---------- |
| Exclude tags | `<strong>` |

Input:

```json theme={null}
{ "description": "<p>Soft <strong>wool</strong> scarf</p>" }
```

Output:

```json theme={null}
{ "description": "Soft <strong>wool</strong> scarf" }
```

```json Configuration theme={null}
{
  "prototype": "string-strip-html",
  "parameters": {
    "excludeTags": "<strong>"
  }
}
```
