# `childrenFromHtml`

## Concepts

`<RichText>` is designed to edit strings of HTML content so these can be used
as WordPress post content.
This isn't much use to us: we want to be able to render content on the frontend
using React.
We want to change `<a>` elements to React Router `<Link>` components, and swap
out list elements with Semantic UI's `<List>`.
Luckily Gutenberg already has the concept of `WPBlockChildren` arrays that
contain a structured representation of HTML content.

## Examples

Example content:

```html
Test <strong>text</strong>
```

Example `WPBlockChildren`:

```json
[
  "Test ",
  {
    "type": "strong",
    "props": {
      "children": ["text"]
    }
  }
]
```

## Usage

```javascript
childrenFromHtml('Test <strong>text</strong>');
// {
//   "content": {
//     "type": "array",
//     "default": []
//   }
// }
```
