# RichHeading

[TwebBlockRichHeading](https://github.com/tigriweb/components/blob/master/controls/TwebBlockRichHeading.js)

<div align="left" data-full-width="false"><figure><img src="https://870798947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWAokPCWM65E5XQJVixgi%2Fuploads%2FLmXeHaPYEA4PNbroAuDK%2Frich-heading.jpg?alt=media&#x26;token=7342a703-dfcc-4c83-aca0-2ef0355d83b0" alt=""><figcaption></figcaption></figure></div>

<details>

<summary>{ className, allowedFormats, onChange, placeholder, name*, attributes*, setAttributes* }</summary>

```jsx
/**
 * @param {string} [className] - CSS class name for styling the rich text element.
 * @param {Array} [allowedFormats] - Array of allowed text formats.
 * @param {function} [onChange] - Callback called when the value changes.
 * @param {string} [placeholder] - Placeholder text for the rich text element.
 * @param {string} name - Attribute name identifying the rich text content.
 * @param {object} attributes - Object containing block attributes.
 * @param {function} setAttributes - Function to set new block attribute values.
 */
```

</details>

{% code title="block.json" overflow="wrap" %}
```json
"testRichHeading": {
	"type": "object",
	"default": {}
},
```
{% endcode %}

{% code title="index.js" overflow="wrap" %}
```jsx
import {
	TwebBlockRichHeading,
} from '@tigriweb/components/controls';
```
{% endcode %}

{% code title="index.js | edit()" %}
```jsx
<TwebBlockRichHeading
	tagName="h2"
	className="custom-class"
	placeholder={ __('BlockControls...', 'your-theme-name') }
	name="testRichHeading"
	{...{ attributes, setAttributes }}
/>
```
{% endcode %}

### TwebBlockRichHeadin&#x67;**.Content** <a href="#twebblockmedia.content" id="twebblockmedia.content"></a>

<details>

<summary>{ className, value* }</summary>

```jsx
/**
 * @param {string} [className] - CSS class name for styling the rich text element.
 * @param {object} value - Current value of the rich text.
 */
```

</details>

{% code title="index.js | save()" %}
```jsx
<TwebBlockRichHeading.Content
	className="custom-class"
	value={ attributes.testRichHeading }
/>
```
{% endcode %}

