TigriWeb Components
AttributesControlsMetaPrimitivesIntegrations
  • Table of Contents
  • Attributes
    • Checkbox
    • Color
    • ColorGradient
    • DateTime
    • Icon
    • Media
    • Number
    • PostType
    • PostTypeMultiple
    • Radio
    • Range
    • Select
    • Taxonomy
    • TaxonomyMultiple
    • Text
    • Textarea
    • Toggle
    • ToolbarButton
    • ToolbarGroup
  • Controls
    • AppenderButton
    • Media
    • RichHeading
    • RichText
  • Meta
    • Checkbox
    • Color
    • DateTime
    • Icon
    • Media
    • Number
    • PostType
    • PostTypeMultiple
    • Radio
    • Range
    • Select
    • Taxonomy
    • TaxonomyMultiple
    • Text
    • Textarea
    • Toggle
  • Primitives
    • HTML
    • SVG
  • Integrations
    • Enqueue SVG icons
    • Enqueue I18n strings
Powered by GitBook
On this page

Was this helpful?

  1. Controls

RichHeading

PreviousMediaNextRichText

Last updated 26 days ago

Was this helpful?

{ className, allowedFormats, onChange, placeholder, name*, attributes*, setAttributes* }
/**
 * @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.
 */
block.json
"testRichHeading": {
	"type": "object",
	"default": {}
},
index.js
import {
	TwebBlockRichHeading,
} from '@tigriweb/components/controls';
index.js | edit()
<TwebBlockRichHeading
	tagName="h2"
	className="custom-class"
	placeholder={ __('BlockControls...', 'your-theme-name') }
	name="testRichHeading"
	{...{ attributes, setAttributes }}
/>

TwebBlockRichHeading.Content

{ className, value* }
/**
 * @param {string} [className] - CSS class name for styling the rich text element.
 * @param {object} value - Current value of the rich text.
 */
index.js | save()
<TwebBlockRichHeading.Content
	className="custom-class"
	value={ attributes.testRichHeading }
/>

TwebBlockRichHeading